Brett Cannon added the comment:
Python 3.5 lets you do:
spec = importlib.util.spec_from_file_location('what.ever', 'foo.py')
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
I am satisfied that case for loading from a file is easy enough to not warrant
keeping load_module() around just for this use case.
----------
resolution: -> rejected
stage: -> resolved
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue21436>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com