Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Suite faillure: importlib race condition #430

Open
hsmett opened this issue Sep 2, 2022 · 0 comments
Open

Test Suite faillure: importlib race condition #430

hsmett opened this issue Sep 2, 2022 · 0 comments

Comments

@hsmett
Copy link
Member

hsmett commented Sep 2, 2022

Example:

======================================================================
ERROR: test_tiny_mce_assets_2_SAMEORIGIN (creme.creme_core.tests.views.test_static.StaticViewTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/circleci/.pyenv/versions/3.9.13/lib/python3.9/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/home/circleci/.pyenv/versions/3.9.13/lib/python3.9/unittest/case.py", line 592, in run
    self._callTestMethod(testMethod)
  File "/home/circleci/.pyenv/versions/3.9.13/lib/python3.9/unittest/case.py", line 550, in _callTestMethod
    method()
  File "/home/circleci/venv/lib/python3.9/site-packages/parameterized/parameterized.py", line 533, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/circleci/creme_crm/creme/creme_core/tests/views/test_static.py", line 14, in test_tiny_mce_assets
    response = self.client.get('/tiny_mce/tiny_mce_popup.js')
  File "/home/circleci/venv/lib/python3.9/site-packages/django/test/client.py", line 742, in get
    response = super().get(path, data=data, secure=secure, **extra)
  File "/home/circleci/venv/lib/python3.9/site-packages/django/test/client.py", line 396, in get
    return self.generic('GET', path, secure=secure, **{
  File "/home/circleci/venv/lib/python3.9/site-packages/django/test/client.py", line 473, in generic
    return self.request(**r)
  File "/home/circleci/venv/lib/python3.9/site-packages/django/test/client.py", line 714, in request
    response = self.handler(environ)
  File "/home/circleci/venv/lib/python3.9/site-packages/django/test/client.py", line 132, in __call__
    self.load_middleware()
  File "/home/circleci/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 40, in load_middleware
    middleware = import_string(middleware_path)
  File "/home/circleci/venv/lib/python3.9/site-packages/django/utils/module_loading.py", line 17, in import_string
    module = import_module(module_path)
  File "/home/circleci/.pyenv/versions/3.9.13/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load
  File "<frozen importlib._bootstrap>", line 158, in __enter__
  File "<frozen importlib._bootstrap>", line 110, in acquire
KeyError: 139762603358016

See: python/cpython#91351
Might be solved with: python/cpython#94504

This issue will never be fixed for Python<=3.9 though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant