-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Use PEP 570 syntax in third party stubs #11554
Conversation
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
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.
I think we should do this. It will only break people who are using very old versions of Python or very old versions of mypy, and users can always pin to an older version of the stubs packages if this causes issues for them.
We should make sure to clearly flag the possible breakage in the commit message, though, so it shows up in the changelog that the stub-uploader autogenerates.
Also — the stub uploader should now be adding |
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.
We've already started using PEP 570 syntax in other places and don't support Python 3.7 anymore.
With python >= 3.10.7 and mypy < 0.981[1], type definitions noting positional only parameters break mypy[2]. Since mypy has been pinned below 0.920 for pydantic, pin redis and requests to their current versions until after the pydantic migration. 1. python/mypy#13627 2. python/typeshed#11554
With python >= 3.10.7 and mypy < 0.981[1], type definitions noting positional only parameters break mypy[2]. Since mypy has been pinned below 0.920 for pydantic, pin redis and requests to their current versions until after the pydantic migration. 1. python/mypy#13627 2. python/typeshed#11554
Is it appropriate to merge this? It will probably break people (e.g. anyone using mypy from a year and a half ago that is missing this change python/mypy#13500 even if they've dropped support for 3.7)