[Python-Dev] Failures in test_site.py - how to debug?
Terry Reedy
tjreedy at udel.edu
Fri Aug 19 12:38:45 EDT 2016
On 8/19/2016 10:13 AM, Chris Angelico wrote:
> On my main dev system (Debian Stretch), I've had a single
> long-standing test failure - test_site.py,
> StartupImportTests.test_startup_imports. It's annoying (partly because
> it's such a noisy failure), and doesn't appear to be happening on the
> buildbots, nor presumably on core devs' computers, so it's probably
> not a Python bug. How can I go about figuring out what's actually
> going on here?
>
> The test effectively runs this (but with -v, which makes it noisy):
>
> $ ./python -I -c 'import sys; print(set(sys.modules))'
> {'_frozen_importlib_external', 'keyword', '_stat', 'weakref',
> 'sysconfig', 'genericpath', '_sysconfigdata_m', '_io', '_operator',
> '_bootlocale', 'encodings.utf_8', 'itertools', '_locale', 'codecs',
> '_weakrefset', 'operator', '_frozen_importlib', 'types',
> '_sitebuiltins', 'os', 'posixpath', '_functools', '__main__',
> '_weakref', '_warnings', '_codecs', 'builtins', 'posix', 'functools',
> 'io', 'encodings.aliases', 'collections.abc', 'encodings', '_thread',
> 'collections', 'errno', '_collections', '_collections_abc', '_heapq',
> '_imp', 'site', 'sys', 'reprlib', '_signal', 'stat', 'zipimport',
> 'abc', 'encodings.latin_1', 'os.path', 'marshal', 'heapq',
> 'mpl_toolkits'}
Sorted() gives an easier to compare listing ;-).
On Windows as of 2 days ago (using required " insteadof ') many fewer:
F:\Python\dev>36\pcbuild\win32\python_d.exe -I -c "import sys;
print(sorted(sys.modules))"
['__main__', '_bootlocale', '_codecs', '_collections_abc',
'_frozen_importlib', '_frozen_importlib_external', '_imp', '_io',
'_locale', '_signal', '_sitebuiltins', '_stat', '_thread', '_warnings',
'_weakref', '_weakrefset', 'abc', 'builtins', 'codecs', 'encodings',
'encodings.aliases', 'encodings.cp1252', 'encodings.cp437',
'encodings.latin_1', 'encodings.mbcs', 'encodings.utf_8', 'errno',
'genericpath', 'io', 'marshal', 'nt', 'ntpath', 'os', 'os.path', 'site',
'stat', 'sys', 'sysconfig', 'winreg', 'zipimport']
test_site passes, so _collections_abc is not a problem
--
Terry Jan Reedy
More information about the Python-Dev
mailing list