[issue14080] Sporadic test_imp failure

Stefan Krah report at bugs.python.org
Sat Feb 25 15:33:17 CET 2012


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

I've trouble debugging this: Is the new version of importlib already
being used? I'm stepping through the offending pep3147 import, which
should correspond to this line in test_dot.py:

   m = __import__('pep3147')
   

Until here Python/import.c is used:

find_module_path (fullname='pep3147', name='pep3147', path='.', path_hooks=[<type at remote 0x843020>], 
    path_importer_cache=
    {'/home/stefan/pydev/cpython-imp/Lib/collections': None, '': None, '/home/stefan/pydev/cpython-imp/Lib/unittest': None, '/home/stefan/pydev/cpython-imp/Lib/multiprocessing': None, '/usr/local/lib/python3.3/site-packages/setuptools-0.6c11-py3.3.egg-info': <imp.NullImporter at remote 0x7ffff7f6f0b0>, '/home/stefan/pydev/cpython-imp/Lib/importlib': None, '/home/stefan/pydev/cpython-imp/Lib/plat-linux': <_FileFinder(_cache_refresh=0, _path_cache={'TYPES.py', 'regen', 'DLFCN.py', 'IN.py', 'CDROM.py'}, path='/home/stefan/pydev/cpython-imp/Lib/plat-linux', _path_mtime=<float at remote 0xa6a838>, modules=[('.cpython-33m.so', <type at remote 0xab5450>), ('.abi3.so', <type at remote 0xab5450>), ('.so', <type at remote 0xab5450>), ('.py', <type at remote 0xab4a40>), ('.pyc', <type at remote 0xab4dc0>)], packages=[('.py', <type at remote 0xab4a40>), ('.pyc', <type at remote 0xab4dc0>)], _relaxed_path_cache={'types.py', 'regen', 'dlfcn.py', 'in.py', 'cdrom.py'}) at remote 0x7ffff37d8b50>, '.': <_FileFinder(_cache_refresh=...(truncated), p_path=0x7fffffff7f80, 
    p_loader=0x7fffffff80b8, p_fd=0x7fffffff7f98) at Python/import.c:1811
1811            if (importer == NULL) {
(gdb) n
1816            if (importer != Py_None) {
(gdb) n
1818                loader = _PyObject_CallMethodId(importer,



After descending further and further into the eval loop, all
of a sudden this appears:


3426        retval = PyEval_EvalFrameEx(f,0);
(gdb) s
PyEval_EvalFrameEx (f=
    Frame 0xafec40, for file /home/stefan/pydev/cpython-imp/Lib/importlib/_bootstrap.py, line 773, in find_module (self=<_FileFinder(_cache_refresh=0, _path_cache=set(), path='.', _path_mtime=<float at remote 0xa6a8b0>, modules=[('.cpython-33m.so', <type at remote 0xab5450>), ('.abi3.so', <type at remote 0xab5450>), ('.so', <type at remote 0xab5450>), ('.py', <type at remote 0xab4a40>), ('.pyc', <type at remote 0xab4dc0>)], packages=[('.py', <type at remote 0xab4a40>), ('.pyc', <type at remote 0xab4dc0>)], _relaxed_path_cache=set()) at remote 0x7ffff4128390>, fullname='pep3147'), 
    throwflag=0) at Python/ceval.c:808


Is this expected?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14080>
_______________________________________


More information about the Python-bugs-list mailing list