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
Python 3.9: Treat missing __args__ on generic types as None #2441
Conversation
In Python 3.9, the __args__ attribute is unset rather than set to None on types that aren't specialized. See: - https://docs.python.org/3.9/whatsnew/changelog.html?highlight=__args__#id2 (search __args__) - https://bugs.python.org/issue40397
Thanks for the patch @encukou! I'm definitely planning to merge this, but will leave it open for now as a reminder that we need to set up a CI build for 3.9 - we have a lot of interaction with typing internals that need to be checked and I won't be confident everything is working without actually checking that in CI. |
going to see if this patch fixes things for our Fedora build (we're tracking Python 3.9 on a side branch), and if it works with Python 3.9b1 I'll see if I can do a PR adding the required CI config |
Thanks @michel-slm - I'm mostly waiting for |
hypothesis 5.15.0 plus this PR still fails with:
|
Every release brings fresh weirdness!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now with Python 3.9 in CI 😁
🎉 Thanks everyone - I can't wait for 3.9.0! |
Wow! Thank you! |
In Python 3.9, the
__args__
attribute is unset rather than set to None on types that aren't specialized.See:
__args__
)Closes #2444.