[New-bugs-announce] [issue14657] Avoid two importlib copies

Antoine Pitrou report at bugs.python.org
Tue Apr 24 00:34:04 CEST 2012


New submission from Antoine Pitrou <pitrou at free.fr>:

This patch avoids creating a second copy of importlib._bootstrap when a first one exists as _frozen_importlib.
This isn't perfect as it mutates the module when importlib is imported for the first time, but I think it's better than the status quo.
Also, importlib itself could be imported somewhere along the startup phase, so that all this is invisible to the user.

I'm not sure how to test this, since _frozen_importlib is an implementation detail, and changing that module's name would probably defeat the test already.

----------
components: Interpreter Core, Library (Lib)
files: unique_importlib.patch
keywords: patch
messages: 159096
nosy: brett.cannon, ncoghlan, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: Avoid two importlib copies
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file25328/unique_importlib.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14657>
_______________________________________


More information about the New-bugs-announce mailing list