Brett Cannon added the comment:

So what I'm gathering is that Martin fixed a bug that accidentally introduced a 
new one in 3.5.2 (which Martin should not feel responsible for; this import 
stuff is all very subtle and people use every nuance of it). To me, the 
question is whether there is a way to not revert Martin's fix -- or any other 
fixes -- while fixing Wolfgang's problem.

If the answer is yes, then great and we just need to know what the answer is in 
the form of a patch. :) My hope is someone will be inspired enough to figure 
out a solution and we can fix this for Wolfgang.

But if the answer is no, then we need to decide what the lesser of two bugs 
are. For me, I see Wolfgang's issue is the lesser of two bugs and thus the one 
that stays broken if we can't fix it reasonably (sorry, Wolfgang). Because we 
are trying to eliminate the double-import as that causes serious problems for 
anyone using import side-effects, I don't want to suddenly slide backwards in 
3.5.3 by letting that happen again (and I think Nick agrees w/ me on that 
point). I also don't want people continuing down a path where they think that 
they can blank out critical import metadata and have import continue to work 
(not that I'm blaming Wolfgang for relying on it, just that it won't hold in 
the future). And since the reliance on __spec__ is just going to grow thanks to 
the elimination of double imports and slowly making that attribute the ground 
truth for import metadata, Wolfgang's code would need to be updated for Python 
3.6 or later anyway.

But as I said, I'm sure everyone's utmost preference is if someone can figure 
out how to fix this in 3.5.3 without undoing another fix.

----------

_______________________________________
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