-
Notifications
You must be signed in to change notification settings - Fork 250
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
Will typing.Tuple
die "in the first Python version released 5 years after the release of Python 3.9.0"?
#1230
Comments
There are currently no plans to remove the aliases from |
Thank you for your response.
I am glad to hear that. |
And just to clarify: I expect that the aliases will be removed at some point, but I don't think we will even start to issue deprecation warnings before the end of life of Python 3.8 (at the end of 2024) as this would indeed be too disruptive. And even then I can see these types to have a fairly long deprecation period. |
See here for some related recent discussion: https://discuss.python.org/t/concern-about-pep-585-removals/15901 |
PEP585 has been updated by python/peps#2778. My fears have been taken away. Thanks for responses. |
Thank you for bringing this up. |
I am developing some python-version-compatible library.
I was using only
typing.Tuple
for hinting.But this way is depreciated by PEP585.
So I set up a conditional branch to use the built-in type
tuple
unlesssys.version_info < (3, 9)
.The type checker did not work well this way, so I submitted microsoft/pylance-release#3066 for help.
From the discussion, "It would be way too disruptive to delete these symbols from
typing
", so I was trying to eliminate the conditional branch.However, some members of this repository have commented they will ”be removed".
#948 (comment)
And there are a number of things that could be interpreted for me as "the definition of
Tuple
in the namespace of thetyping
module will be removed" in some documentations.https://docs.python.org/3/library/typing.html#module-contents
https://peps.python.org/pep-0585/#implementation
I was upset.
Does the above wording mean that the definition in the
typing
module will replace fromTuple = _TupleType(tuple, -1, inst=False, name='Tuple')
to (such as)from builtins import tuple as Tuple
?Or will the definition named
Tuple
be removed?The text was updated successfully, but these errors were encountered: