homepage

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 ebfortin
Recipients brett.cannon, ebfortin, eric.snow, ncoghlan, paul.moore, petr.viktorin, steve.dower, tim.golden, zach.ware
Date 2015年07月30日.13:45:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1438263935.13.0.150569865142.issue24748@psf.upfronthosting.co.za>
In-reply-to
Content
I replaced:
 import importlib.machinery
 loader = importlib.machinery.ExtensionFileLoader(name, path)
 return loader.load_module()
With:
 import importlib.machinery
 loader = importlib.machinery.ExtensionFileLoader(modname, filename)
 spec = importlib.machinery.ModuleSpec(
 name = modname,
 loader = loader,
 origin = filename,
 loader_state = 1234,
 is_package = False,
 )
 mod = loader.create_module(spec)
 loader.exec_module(mod)
And it now works as advertised. Since load_module() is flagged as Deprecated, I believe no correction is necessary as the preffered way to load a module, with exec_module(), is working. 
I will do some more tests to be sure it's the case.
History
Date User Action Args
2015年07月30日 13:45:35ebfortinsetrecipients: + ebfortin, brett.cannon, paul.moore, ncoghlan, tim.golden, petr.viktorin, eric.snow, zach.ware, steve.dower
2015年07月30日 13:45:35ebfortinsetmessageid: <1438263935.13.0.150569865142.issue24748@psf.upfronthosting.co.za>
2015年07月30日 13:45:35ebfortinlinkissue24748 messages
2015年07月30日 13:45:34ebfortincreate

AltStyle によって変換されたページ (->オリジナル) /