Skip to content

requirements.txt: Add typing-extensions as dependency

The typing_extensions module is used since 76480202 so we need to add it as explicit dependency.

This is what we get in docker for instance otherwise:

Traceback (most recent call last):
swh-web_1                       |   File "/srv/softwareheritage/venv/bin/django-admin", line 8, in <module>
swh-web_1                       |     sys.exit(execute_from_command_line())
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
swh-web_1                       |     utility.execute()
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/core/management/__init__.py", line 356, in execute
swh-web_1                       |     self.fetch_command(subcommand).run_from_argv(self.argv)
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
swh-web_1                       |     self.execute(*args, **cmd_options)
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/core/management/base.py", line 327, in execute
swh-web_1                       |     self.check()
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/core/management/base.py", line 359, in check
swh-web_1                       |     include_deployment_checks=include_deployment_checks,
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/core/management/commands/migrate.py", line 62, in _run_checks
swh-web_1                       |     issues.extend(super(Command, self)._run_checks(**kwargs))
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/core/management/base.py", line 346, in _run_checks
swh-web_1                       |     return checks.run_checks(**kwargs)
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/core/checks/registry.py", line 81, in run_checks
swh-web_1                       |     new_errors = check(app_configs=app_configs)
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/core/checks/urls.py", line 16, in check_url_config
swh-web_1                       |     return check_resolver(resolver)
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/core/checks/urls.py", line 26, in check_resolver
swh-web_1                       |     return check_method()
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/urls/resolvers.py", line 256, in check
swh-web_1                       |     for pattern in self.url_patterns:
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/utils/functional.py", line 35, in __get__
swh-web_1                       |     res = instance.__dict__[self.name] = self.func(instance)
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/urls/resolvers.py", line 407, in url_patterns
swh-web_1                       |     patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/utils/functional.py", line 35, in __get__
swh-web_1                       |     res = instance.__dict__[self.name] = self.func(instance)
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/urls/resolvers.py", line 400, in urlconf_module
swh-web_1                       |     return import_module(self.urlconf_name)
swh-web_1                       |   File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
swh-web_1                       |     return _bootstrap._gcd_import(name[level:], package, level)
swh-web_1                       |   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
swh-web_1                       |   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
swh-web_1                       |   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
swh-web_1                       |   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
swh-web_1                       |   File "<frozen importlib._bootstrap_external>", line 728, in exec_module
swh-web_1                       |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/web/urls.py", line 36, in <module>
swh-web_1                       |     url(r'^api/', include('swh.web.api.urls')),
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/django/conf/urls/__init__.py", line 50, in include
swh-web_1                       |     urlconf_module = import_module(urlconf_module)
swh-web_1                       |   File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
swh-web_1                       |     return _bootstrap._gcd_import(name[level:], package, level)
swh-web_1                       |   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
swh-web_1                       |   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
swh-web_1                       |   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
swh-web_1                       |   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
swh-web_1                       |   File "<frozen importlib._bootstrap_external>", line 728, in exec_module
swh-web_1                       |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/web/api/urls.py", line 6, in <module>
swh-web_1                       |     import swh.web.api.views.content # noqa
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/web/api/views/content.py", line 16, in <module>
swh-web_1                       |     from swh.web.api.views.utils import api_lookup
swh-web_1                       |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/web/api/views/utils.py", line 8, in <module>
swh-web_1                       |     from typing_extensions import Protocol
swh-web_1                       | ModuleNotFoundError: No module named 'typing_extensions'

Migrated from D2512 (view on Phabricator)

Merge request reports