[Python-checkins] cpython (3.3): Issue #19392: Document that imp.reload() now relies on __loader__

brett.cannon python-checkins at python.org
Fri Oct 25 19:49:33 CEST 2013


http://hg.python.org/cpython/rev/f575f6298eb1
changeset:   86626:f575f6298eb1
branch:      3.3
parent:      86618:85dcab725a2d
user:        Brett Cannon <brett at python.org>
date:        Fri Oct 25 13:46:15 2013 -0400
summary:
  Issue #19392: Document that imp.reload() now relies on __loader__
being defined on top of __name__.

files:
  Doc/library/imp.rst |  4 ++++
  Misc/NEWS           |  3 +++
  2 files changed, 7 insertions(+), 0 deletions(-)


diff --git a/Doc/library/imp.rst b/Doc/library/imp.rst
--- a/Doc/library/imp.rst
+++ b/Doc/library/imp.rst
@@ -172,6 +172,10 @@
    the class does not affect the method definitions of the instances --- they
    continue to use the old class definition.  The same is true for derived classes.
 
+   .. versionchanged:: 3.3
+      Relies on both ``__name__`` and ``__loader__`` being defined on the module
+      being reloaded instead of just ``__name__``.
+
 
 The following functions are conveniences for handling :pep:`3147` byte-compiled
 file paths.
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -531,6 +531,9 @@
 Documentation
 -------------
 
+- Issue #19392: Document that `imp.reload()` now also requires `__loader__` to
+  be set on the module being reloaded.
+
 - Issue #18758: Fixed and improved cross-references.
 
 - Issue #18743: Fix references to non-existant "StringIO" module.

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list