We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i admit i do not understand completely what's going on, but the Field._creation_counter seems like a hack to me, and i wonder why it's necessary?
Field._creation_counter
since python 3.6, dictionaries retain insertion order which, iiuc, means the attrs passed to __new__ are in source code order already.
attrs
__new__
why not assign all fields to __schematype_fields__ instead and use that when ordering is needed?
__schematype_fields__
while looking at it, parent schema fields are included in child schema, but does schematype handle overrides of fields correctly at all? the attrs project has some code that may be relevant to look at here, since it deals with similar problems: https://github.com/python-attrs/attrs/blob/4fe28966e88b9b85c9c2df77ffb34f70175c4492/src/attr/_make.py#L351-L362
schematype
The text was updated successfully, but these errors were encountered:
since python 3.6, dictionaries retain insertion order which, iiuc, means the attrs passed to new are in source code order already.
Okay... if we can demonstrate in a test case that the field ordering matches the source code ordering, then I'm 100% happy to drop it, yup!
Sorry, something went wrong.
parent schema fields are included in child schema, but does schematype handle overrides of fields correctly at all?
Believe so, yup. Fairly sure there's a test case for exactly that, but worth double checking.
No branches or pull requests
i admit i do not understand completely what's going on, but the
Field._creation_counter
seems like a hack to me, and i wonder why it's necessary?since python 3.6, dictionaries retain insertion order which, iiuc, means the
attrs
passed to__new__
are in source code order already.why not assign all fields to
__schematype_fields__
instead and use that when ordering is needed?while looking at it, parent schema fields are included in child schema, but does
schematype
handle overrides of fields correctly at all? theattrs
project has some code that may be relevant to look at here, since it deals with similar problems: https://github.com/python-attrs/attrs/blob/4fe28966e88b9b85c9c2df77ffb34f70175c4492/src/attr/_make.py#L351-L362The text was updated successfully, but these errors were encountered: