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 <rep...@bugs.python.org>
<http://bugs.python.org/issue27487>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to