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 Arfrever, aronacher, brett.cannon, eric.araujo, eric.snow, flox, ncoghlan, tshepang, yselivanov
Date 2014-05-26.18:45:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401129904.94.0.730102111459.issue21235@psf.upfronthosting.co.za>
In-reply-to
Content
I'm just considering current usage:

  mod = loader.load_module(name)

becomes:

  spec = spec_from_loader(name, loader)
  mod = load(spec)

vs.

  mod = load(name, loader=loader)

I guess I'm torn.  I like how the former forces you to consider specs when dealing with the import system.  On the other hand, I don't want it to be annoying to have to move to this brave new world (that's exactly why we toned down the deprecations).  And on the third hand, perhaps it would be annoying to just a handful of people so we shouldn't sweat it.

So if we end up simplifying, load() could look like this:

def load(spec):  # or "load_from_spec"
    return _SpecMethods(spec).load()

It already takes care of everything we need, including the import lock stuff.
History
Date User Action Args
2014-05-26 18:45:04eric.snowsetrecipients: + eric.snow, brett.cannon, ncoghlan, aronacher, eric.araujo, Arfrever, flox, tshepang, yselivanov
2014-05-26 18:45:04eric.snowsetmessageid: <1401129904.94.0.730102111459.issue21235@psf.upfronthosting.co.za>
2014-05-26 18:45:04eric.snowlinkissue21235 messages
2014-05-26 18:45:04eric.snowcreate