Issue 14582: Have importlib use return value from a loader's load_module() (original) (raw)
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/58787
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) * ![]() |
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) * ![]() |
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) ![]() |
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) ![]() |
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:29 | admin | set | github: 58787 |
2012-04-18 14:55:51 | python-dev | set | messages: + |
2012-04-15 19:25:55 | brett.cannon | set | status: open -> closedresolution: fixedstage: test needed -> resolved |
2012-04-15 19:25:22 | python-dev | set | nosy: + python-devmessages: + |
2012-04-14 21:21:19 | eric.snow | set | nosy: + eric.snowmessages: + |
2012-04-14 20:31:40 | brett.cannon | create |