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
Clean-up typing_extensions
after support dropped for older Pythons
#892
Conversation
typing_extensions
after support dropped older Pythonstyping_extensions
after support dropped for older Pythons
Rebased onto latest master after #893 |
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 for all this work!
This looks good, but I'll want to check manually that 3.6.0 and 3.6.1 still work since they're not covered by CI.
CONTRIBUTING.md
Outdated
@@ -18,8 +18,7 @@ standard library, so that users can experiment with them before they are added t | |||
standard library. Such features should ideally already be specified in a PEP or draft | |||
PEP. | |||
|
|||
`typing_extensions` still supports all Python versions supported by `typing`, down to | |||
Python 2.7 and 3.4. However, it is OK to omit support for Python versions that have | |||
`typing_extensions` supports Python 3.6+. However, it is OK to omit support for Python versions that have | |||
reached end of life if doing so is too difficult or otherwise does not make sense. For | |||
example, `typing_extensions.AsyncGenerator` only exists on Python 3.6 and higher, |
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 example doesn't make sense any more because only 3.6+ are supported. Maybe we can recast it to say something like "Back when we still supported 3.5, AsyncGenerator was only available in 3.6+"
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.
Updated to "For example, typing_extensions.AsyncGenerator
was only supported in Python 3.6 and newer, because async generators were not part of the language before then."
A
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.
You could also phrase in the negative -- e.g. "For example, typing_extensions.AsyncGenerator
was not supported in Python versions before 3.6, as async generators were not part of the language."
I checked 3.6.0, but not 3.6.1 -- although I think I covered all the edge cases for changes between micro versions. A |
|
||
if HAVE_PROTOCOLS: | ||
__all__.extend(['Protocol', 'runtime', 'runtime_checkable']) | ||
__all__.extend(['Annotated', 'Protocol', 'runtime', 'runtime_checkable']) |
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.
Given these names are now unconditionally added to __all__
, I think they should be in the initial definition -- but not sure in which category to put them
A
I'm sorry that there hasn't been any feedback lately. Part of it is that I didn't yet have time to fully review the changes in the src dir, part that I wasn't sure how to best proceed, considering our lack of a clear versioning policy. I have opened python/typing_extensions#32 to clear the latter up. |
Thanks Sebastian If I could do anything to ease the review, happy to help. Also happy to wait until the versioning policy has been clarified. A |
And sorry again. Could you maybe split this into two PRs: One with the changes to typing_extensions and one with the "meta" changes for the build process? I had already reviewed the meta changes and then didn't find the time to continue with the lib. Splitting it would be easier. |
Done @srittau |
@AA-Turner: Thanks for splitting! Is this PR still relevant or can it be closed? |
No, closing. Thanks! |
@hauntsaninja noted that a PR would likely be welcome, so opening here.
xref #867, #867 (comment)
A