Message158623
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. |
|
Date |
User |
Action |
Args |
2012-04-18 14:27:32 | eric.snow | set | recipients:
+ eric.snow, brett.cannon, pjenvey, benjamin.peterson |
2012-04-18 14:27:32 | eric.snow | set | messageid: <1334759252.49.0.483910827293.issue14609@psf.upfronthosting.co.za> |
2012-04-18 14:27:31 | eric.snow | link | issue14609 messages |
2012-04-18 14:27:31 | eric.snow | create | |
|