typing_extensions shouldn't be a dependency on Python 3.11+
See original GitHub issueDescribe the bug All of the names imported from typing_extensions are available in the typing module in the standard library on Python 3.11+.
To Reproduce
- for example
python3 -c "from typing import Never"
where python3 is Python 3.11
Please complete the following information:
- OS: Linux
- OS Version Void Linux rolling
- python 3.11
- version of type checker -
- version of installed
pandas-stubs
master
Additional context Most programs do something similar to this:
try:
from typing import Never
except ImportError:
from typing_extensions import Never
Issue Analytics
- State:
- Created 9 months ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Missed dependency when import web3: typing_extensions
However, say a user is running python 3.6/3.7, then they need to have typing_extensions installed if they want to do any type checking....
Read more >typing-extensions
The following have always been present in typing , but the typing_extensions versions provide additional features: Any (supports inheritance since Python 3.11) ...
Read more >pytest coverage not working after python update to 3.11
In Python 3.6, upgrade all dependencies to the latest version that supports Python ... tomli==2.0.1 typing_extensions==4.4.0 zipp==3.11.0.
Read more >python/typing - Gitter
I am wondering what is the best practice with typing_extensions installation? Should it be a runtime dependency or a dev-depedency?
Read more >Python 3.11 Preview: TOML and tomllib
To resolve the situation, PEP 518 introduced the pyproject.toml configuration file, which specifies Python project build dependencies. PEP 518 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is just an unnecessary dependency I noticed, nothing more. I was not aware of the issue with try except block and I get that comparing the python version would be unnecessarily complicated. Thank you and feel free to close this issue.
Thank you for differentiating
typing
vs.collections.abc
andtyping
vs.typing_extensions
! I just now realized you meant to prioretizetyping_extension.Literal
overtyping.Literal
- I was thinking about the opposite. Similar to numpy, pandas(-stubs) requires 3.8+.I think we should simply wait until pandas requires a newer python version before avoiding the
typing_extension
imports.