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_iter_importers intermittent failure in test_pkgutil #61931
Comments
A buildbot produced the following traceback, but the test passed when re-run. http://buildbot.python.org/all/builders/x86%20Gentoo%203.3/builds/630/steps/test/logs/stdio test_loader_deprecated (test.test_pkgutil.ImportlibMigrationTests) ... ok ====================================================================== Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1521, in _find_and_load_unlocked
AttributeError: 'module' object has no attribute '__path__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lib/buildslave/3.3.murray-gentoo/build/Lib/test/test_pkgutil.py", line 206, in test_iter_importers
importlib.import_module(fullname)
File "/var/lib/buildslave/3.3.murray-gentoo/build/Lib/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1586, in _gcd_import
File "<frozen importlib._bootstrap>", line 1567, in _find_and_load
File "<frozen importlib._bootstrap>", line 1524, in _find_and_load_unlocked
ImportError: No module named 'spam.eggs'; spam is not a package
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lib/buildslave/3.3.murray-gentoo/build/Lib/test/test_pkgutil.py", line 226, in test_iter_importers
del sys.modules['spam.eggs']
KeyError: 'spam.eggs' |
"spam" is a fairly generic name, so I'm guessing something else is leaving a "spam" module around in sys.modules - when I run the tests with the order given in RDM's original report, I get the same error. I also get a failure in test_builtin though, which is a little weird. With the attached file, test_builtin fails (so one of the uncommented tests appears to be interfering with that), while test_pkgutil passes (suggesting that the problem there is one the tests flagged with "#TEMP#" |
Created bpo-17734 for the weird interference between test_genexps and test_builtin |
New changeset 73c79022977b by Nick Coghlan in branch '3.3': New changeset 5d4001e32a31 by Nick Coghlan in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: