[Python-checkins] cpython: Tweak importlib._bootstrap to avoid zero-argument super so I can work on issue

nick.coghlan python-checkins at python.org
Sun May 27 10:17:22 CEST 2012


http://hg.python.org/cpython/rev/bcb3b81853cc
changeset: 77180:bcb3b81853cc
user: Nick Coghlan <ncoghlan at gmail.com>
date: Sun May 27 17:49:58 2012 +1000
summary:
 Tweak importlib._bootstrap to avoid zero-argument super so I can work on issue #14857 without breaking imports
files:
 Lib/importlib/_bootstrap.py | 4 +++-
 Python/importlib.h | Bin 
 2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -771,7 +771,9 @@
 @_check_name
 def load_module(self, fullname):
 """Load a module from a file."""
- return super().load_module(fullname)
+ # Issue #14857: Avoid the zero-argument form so the implementation
+ # of that form can be updated without breaking the frozen module
+ return super(FileLoader, self).load_module(fullname)
 
 @_check_name
 def get_filename(self, fullname):
diff --git a/Python/importlib.h b/Python/importlib.h
index cd8fbebb9ff7c4a671320695174aa8953db75845..224e28c029a7dc4b51e87b6f07a9f213f8d2bcf2
GIT binary patch
[stripped]
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /