Skip to content

Commit 6fd25c3

Browse files
committed
Issue #19392: Document that imp.reload() now relies on __loader__
being defined on top of __name__.
1 parent a4f6b00 commit 6fd25c3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Doc/library/imp.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ This module provides an interface to the mechanisms used to implement the
172172
the class does not affect the method definitions of the instances --- they
173173
continue to use the old class definition. The same is true for derived classes.
174174

175+
.. versionchanged:: 3.3
176+
Relies on both ``__name__`` and ``__loader__`` being defined on the module
177+
being reloaded instead of just ``__name__``.
178+
175179

176180
The following functions are conveniences for handling :pep:`3147` byte-compiled
177181
file paths.

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,9 @@ Tests
531531
Documentation
532532
-------------
533533

534+
- Issue #19392: Document that `imp.reload()` now also requires `__loader__` to
535+
be set on the module being reloaded.
536+
534537
- Issue #18758: Fixed and improved cross-references.
535538

536539
- Issue #18743: Fix references to non-existant "StringIO" module.

0 commit comments

Comments
 (0)