Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

drop Field._creation_counter? #49

Description

@wbolster

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? 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions