[issue15111] Wrong ImportError message with importlib
Amaury Forgeot d'Arc
report at bugs.python.org
Wed Jun 20 02:17:27 CEST 2012
New submission from Amaury Forgeot d'Arc <amauryfa at gmail.com>:
Up to Python3.2, a nested ImportError was correctly displayed:
./python -c "import distutils.msvc9compiler"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/amauryfa/python/cpython3.2/Lib/distutils/msvc9compiler.py", line 27, in <module>
import winreg
ImportError: No module named winreg
But with 3.3, the traceback is lost:
~/python/cpython3.x$ ./python -c "from distutils import msvc9compiler"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: cannot import name msvc9compiler
Even though the failure is still on the "import winreg" line. Only ImportError seems affected, other exceptions are correctly displayed.
----------
components: Interpreter Core
messages: 163234
nosy: amaury.forgeotdarc
priority: normal
severity: normal
status: open
title: Wrong ImportError message with importlib
type: behavior
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15111>
_______________________________________
More information about the Python-bugs-list
mailing list