Eric Snow <ericsnowcurren...@gmail.com> added the comment:

that's a pretty sneaky hack, but I can see the (weak) point of it.  So, to keep 
backward compatibility, importlib._bootstrap._find_and_load() would have to 
return sys.modules[fullname] instead of the module returned by 
loader.load_module(fullname).

My inclination is to break the backward compatibility and work with 
py.test/twisted/etc. to set things right.  If we don't, then we should consider 
changing the spec of the import statement in the language reference.

The hash randomization case for breaking backward compatibility relied on 
"everyone know better" and "there aren't any big use cases" (for dependence on 
dict key order).  Here it's not so cut and dry.  Still, it seems like a 
candidate for breaking "backward compatibility", as long as the (legitimate) 
alternative is easy and a faithful substitute.

I was considering bringing this up on python-dev, but I'd rather hear Brett's 
point of view first.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14609>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to