Skip to content

Conversation

honnibal
Copy link
Member

After the Cython 3 change, the types of enum members such as spacy.parts_of_speech.NOUN became 'flag', rather than simple 'int'. This change mostly doesn't matter because the flag type does duck-type like an int -- it compares, additions, prints etc the same. However, it doesn't repr the same and if you do an isinstance check it will fail. It's therefore better to just make them ints like they were before.

Description

Types of change

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.
  • I ran the tests, and all new and existing tests passed.
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

honnibal added 5 commits May 27, 2025 11:09
After the Cython 3 change, the types of enum members such as
spacy.parts_of_speech.NOUN became 'flag', rather than simple 'int'.
This change mostly doesn't matter because the flag type does duck-type
like an int -- it compares, additions, prints etc the same. However,
it doesn't repr the same and if you do an isinstance check it will fail.
It's therefore better to just make them ints like they were before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant