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.

classification
Title: Have importlib use return value from a loader's load_module()
Type: performance Stage: resolved
Components: Interpreter Core Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: brett.cannon, eric.snow, python-dev
Priority: low Keywords:

Created on 2012-04-14 20:31 by brett.cannon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg158280 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2012-04-14 20:31
Right now importlib doesn't use what loader.load_module() returns as that was what import.c did. But PEP 302 explicitly states that load_module() is expected to return the module that was loaded. So to save a dict lookup I want to rely on the return value of load_module().
msg158284 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2012-04-14 21:21
big +1!  I went quite a while before realizing that loader.load_module() was supposed to return the module, due to this specific issue.
msg158356 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-04-15 19:25
New changeset 005fd1fe31ab by Brett Cannon in branch 'default':
Issue #14582: Import returns the module returned by a loader instead
http://hg.python.org/cpython/rev/005fd1fe31ab
msg158629 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-04-18 14:55
New changeset db5e3431ee4c by Benjamin Peterson in branch 'default':
rollback 005fd1fe31ab (see #14609 and #14582)
http://hg.python.org/cpython/rev/db5e3431ee4c
History
Date User Action Args
2022-04-11 14:57:29adminsetgithub: 58787
2012-04-18 14:55:51python-devsetmessages: + msg158629
2012-04-15 19:25:55brett.cannonsetstatus: open -> closed
resolution: fixed
stage: test needed -> resolved
2012-04-15 19:25:22python-devsetnosy: + python-dev
messages: + msg158356
2012-04-14 21:21:19eric.snowsetnosy: + eric.snow
messages: + msg158284
2012-04-14 20:31:40brett.cannoncreate