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.

Title: Use importlib.util.module_to_load in all loaders in importlib
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: brett.cannon, python-dev
Priority: normal Keywords: easy

Created on 2013-06-01 03:15 by brett.cannon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg190435 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-06-01 03:15
BuiltinImporter, FrozenImporter, and ExtensionFileLoader all have their own custom code to manage clearing sys.modules if something goes wrong. Should see if any of them would break if they used importlib.util.module_to_load. And if they would break thanks to any pre-existing module in sys.modules, then add a keyword argument to suppress creating a new module.
msg190437 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-06-01 03:25
Turns out BuiltinImporter doesn't like having a pre-existing module, so a new keyword argument will be necessary to allow for only the cleanup code to run and not the construction of a new module.
msg191290 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-06-16 21:23
New changeset 205aa49e5cd5 by Brett Cannon in branch 'default':
Issue #18115: Abstract out managing the cleanup of modules to use in
Date User Action Args
2022-04-11 14:57:46adminsetgithub: 62315
2013-06-16 21:23:27brett.cannonsetstatus: open -> closed
resolution: fixed
stage: needs patch -> resolved
2013-06-16 21:23:15python-devsetnosy: + python-dev
messages: + msg191290
2013-06-01 03:25:18brett.cannonsetmessages: + msg190437
2013-06-01 03:15:34brett.cannoncreate