[New-bugs-announce] [issue19720] suppress context for some exceptions in importlib?
Eric Snow
report at bugs.python.org
Fri Nov 22 19:36:50 CET 2013
New submission from Eric Snow:
Some exceptions in importlib are raised from within except blocks, resulting in chained tracebacks. [1] For at least some of these we should consider suppressing the exception context.
For example (for [1]):
try:
path = parent_module.__path__
except AttributeError:
msg = (_ERR_MSG + '; {} is not a package').format(name, parent)
raise ImportError(msg, name=name) from None
[1] http://hg.python.org/cpython/file/default/Lib/importlib/_bootstrap.py#l2088
----------
messages: 203830
nosy: brett.cannon, eric.snow
priority: low
severity: normal
stage: needs patch
status: open
title: suppress context for some exceptions in importlib?
type: enhancement
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19720>
_______________________________________
More information about the New-bugs-announce
mailing list