testcontainers/testcontainers-python

Bug: Module 'typing_extensions' not found, not listed as dependency

yvanoers opened this issue · 1 comments

Describe the bug

I got this error today:

Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/integration_test.py:6: in <module>
    from testcontainers.localstack import LocalStackContainer
../../../../.local/lib/python3.10/site-packages/testcontainers/localstack/__init__.py:19: in <module>
    from testcontainers.core.container import DockerContainer
../../../../.local/lib/python3.10/site-packages/testcontainers/core/container.py:7: in <module>
    from typing_extensions import Self
E   ModuleNotFoundError: No module named 'typing_extensions'

Our testcontainers dependency is not pinned to a version, and today it pulled in 4.3.2 and failed with above error.
After rolling back to 4.3.1 the error was gone.

The problem seems to be that typing_extensions is not listed as dependency in pyproject.toml.

To Reproduce

Use testcontainers in a clean environment, meaning that it doesn't have any preinstalled typing_extensions module.
In our case, this is a Github Actions runner.

Runtime environment

Doesn't seem relevant at this time, but will provide if necessary.

@yvanoers terribly sorry, fix is out though