This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.snow
Recipients benjamin.peterson, brett.cannon, eric.snow, pjenvey
Date 2012-04-18.14:27:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334759252.49.0.483910827293.issue14609@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-04-18 14:27:32eric.snowsetrecipients: + eric.snow, brett.cannon, pjenvey, benjamin.peterson
2012-04-18 14:27:32eric.snowsetmessageid: <1334759252.49.0.483910827293.issue14609@psf.upfronthosting.co.za>
2012-04-18 14:27:31eric.snowlinkissue14609 messages
2012-04-18 14:27:31eric.snowcreate