-
-
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
Remove Python 3.6 branches from typeshed #8269
Conversation
This comment has been minimized.
This comment has been minimized.
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.
Thanks, one thing I noticed below.
stdlib/contextlib.pyi
Outdated
IO, | ||
Any, | ||
AsyncContextManager as AbstractAsyncContextManager, | ||
ContextManager as AbstractContextManager, |
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.
This does not re-export, according to PEP 484. (Existing type checkers might still re-export due to __all__
, but that is undefined behavior.)
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.
Interesting, I think we're a little inconsistent about that at the moment, e.g. in our stubs for _collections_abc
. Anyhow, I've made the change!
Diff from mypy_primer, showing the effect of this PR on open source code: sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/util/typing.py: note: In function "_restify_py36":
+ sphinx/util/typing.py:267:26: error: Module has no attribute "GenericMeta"; maybe "Generic"? [attr-defined]
+ sphinx/util/typing.py: note: In function "_stringify_py36":
+ sphinx/util/typing.py:505:33: error: Module has no attribute "GenericMeta"; maybe "Generic"? [attr-defined]
+ sphinx/util/typing.py: note: At top level:
+ sphinx/util/typing.py:507: error: Unused "type: ignore" comment
+ sphinx/util/typing.py:508: error: Unused "type: ignore" comment
+ sphinx/util/typing.py:509: error: Unused "type: ignore" comment
+ sphinx/util/typing.py:510: error: Unused "type: ignore" comment
+ sphinx/util/typing.py:513: error: Unused "type: ignore" comment
+ sphinx/util/typing.py:514: error: Unused "type: ignore" comment
|
The first commit here was done using the following script:
The second and third commit were done manually.
Closes #6189