question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

typing_extensions is still required in newer Python versions

See original GitHub issue

This 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:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jkuglercommented, Jun 1, 2022

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.

0reactions
sobolevncommented, Jun 1, 2022

Thanks! 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found