[issue23809] RFE: emit a warning when a module in a traceback shadows a stdlib module

Robert Collins report at bugs.python.org
Mon Mar 30 03:07:17 CEST 2015


Robert Collins added the comment:

Implementation wise: this is not part of the generic rendering-of-tracebacks; I'd like to make the traceback new stuff be tastefully extensible - I'd be inclined to do this with a per-frame-callback on render (so we don't pay overhead on unrendered tb's) and a global variable that controls the default hooks loaded into the objects.

That would:
 - allow folk using the raw API to control what hooks are at play
 - allow third-parties to install additional things globally, to influence code using the existing old tb apis
 - make testing of the warning specific code be very straight forward and isolated

----------

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


More information about the Python-bugs-list mailing list