-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
typing._UnionGenericAlias
is unhashable in 3.14
#133925
New issue
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
Labels
Comments
Git bisect agrees, cc @JelleZijlstra. |
JelleZijlstra
added a commit
to JelleZijlstra/cpython
that referenced
this issue
May 12, 2025
It's because I added |
JelleZijlstra
added a commit
that referenced
this issue
May 12, 2025
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 12, 2025
…3929) (cherry picked from commit 8d478c7) Co-authored-by: Jelle Zijlstra <[email protected]>
JelleZijlstra
added a commit
that referenced
this issue
May 12, 2025
Is there a reason to keep this open after the fox was merged ? |
no, this is done now that the 🦊 is merged |
Thanks, all ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
typing._UnionGenericAlias)
became unshable somewhere between 3.13 and 3.14.0b1 (most likely in gh-105511)This was hit in a doctest from
astropy
: xref astropy/astropy#18126To be clear, the test in question doesn't necessarily correspond to a real-life application; we're testing that our
itersubclasses
utility function works in a very broad case where we try to retrieve all defined subclasses ofobject
, and do a bit of internal book-keeping using aset
of already-visited classes. This used to work in Python 3.13 (and seems to have worked with no interruption for 10+ years), so it still seemed worth a shot to see if that would be considered a bug here. Otherwise, it should be possible to fix the function on our side to either special case this exact class, ignore any unhashable class, or avoid reequiring hashability altogether.CPython versions tested on:
3.14
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: