Message215631
The inspiration was that I realized there was no technical reason to have it on InspectLoader. Past that there was my thinking of trying to come up with a source_to_module() method on importlib.abc.Loader which would do the right thing with create_module() and init_module_attrs() such that replicating imp.load_module() would be something like::
loader = importlib.machinery.SourceLoader # or something
with open('file.py') as file:
module = loader.source_to_module(file.read(), location='file.py') |
|
Date |
User |
Action |
Args |
2014-04-05 20:54:42 | brett.cannon | set | recipients:
+ brett.cannon, eric.snow |
2014-04-05 20:54:42 | brett.cannon | set | messageid: <1396731282.96.0.572654595046.issue21156@psf.upfronthosting.co.za> |
2014-04-05 20:54:42 | brett.cannon | link | issue21156 messages |
2014-04-05 20:54:42 | brett.cannon | create | |
|