[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

Wolfgang Maier report at bugs.python.org
Thu Jul 14 03:27:19 EDT 2016


Wolfgang Maier added the comment:

A warning like this sounds good to me though I'd prefer it to be slightly more verbose, like:

"RuntimeWarning: '<module>' found in sys.modules after import of package '<package>', but prior to execution of '<module>' as '__main__'; this may result in unpredictable behaviour"

or it wouldn't really have helped me much to understand what was happening.

P.S.: You understood correctly that my own code is fixed (patch sent to the affected user, next release will have the fix). Learnt something about the whole __spec__ and double import subject along the way so it wasn't completely wasted time.

----------

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


More information about the Python-bugs-list mailing list