typing_extensions is still required in newer Python versions
See original GitHub issueThis line is in poetry.lock
[package.dependencies]
attrs = ">=20"
typing_extensions = {version = "*", markers = "python_version >= \"3.7\" and python_version < \"3.8\""}
However, on a fresh Ubuntu 20.04 system, after I install pytest and pytest-django, I got this error when I ran my tests:
traceback snipped
File "/home/vagrant/.local/share/virtualenvs/redacted-ikMrF094/lib/python3.8/site-packages/_pytest/assertion/rewrite.py", line 170, in exec_module
exec(co, module.__dict__)
File "/home/vagrant/.local/share/virtualenvs/redacted/lib/python3.8/site-packages/django_test_migrations/contrib/pytest_plugin.py", line 6, in <module>
from django_test_migrations.constants import MIGRATION_TEST_MARKER
File "/home/vagrant/.local/share/virtualenvs/redacted/lib/python3.8/site-packages/_pytest/assertion/rewrite.py", line 170, in exec_module
exec(co, module.__dict__)
File "/home/vagrant/.local/share/virtualenvs/redacted/lib/python3.8/site-packages/django_test_migrations/constants.py", line 1, in <module>
from typing_extensions import Final
ModuleNotFoundError: No module named 'typing_extensions'
It would appear this module still needs to depend on typing_extensions.
Ubuntu 20.04
Python 3.8.6
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
typing-extensions - PyPI
typing_extensions supports Python versions 3.7 and higher. In the future, support for older Python versions will be dropped some time after that version...
Read more >typing_extensions is only needed for python < 3.8 · Issue #5942
The issue is that we are currently unconditionally depend on typing_extensions although we only need to for Python 3.7. For all other Python ......
Read more >Cannot import name 'Required' from 'typing_extensions'
The "ImportError: cannot import name 'Required' from 'typing_extensions'" occurs when we have an outdated version of the typing-extensions module.
Read more >typing-extensions - Python Package Health Analysis - Snyk
The typing_extensions module serves two related purposes: Enable use of new type system features on older Python versions. For example, typing.TypeGuard is new...
Read more >Python Type Hints - How to Split Types by Python Version
The typing module continues to evolve, with new features in every Python version. This can make it tricky if you're trying to type...
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
I can’t seem to reproduce it now. I am wondering if I was relying on a project’s out-of-date Pipefile.lock. I’ll let you know if I come across this again.
Thanks! 👍