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]):

            path = parent_module.__path__
        except AttributeError:
            msg = (_ERR_MSG + '; {} is not a package').format(name, parent)
            raise ImportError(msg, name=name) from None


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 <>
Python-bugs-list mailing list

Reply via email to