]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #24713: Use importlib.reload() in import reference document.
authorBerker Peksag <berker.peksag@gmail.com>
Sat, 25 Jul 2015 10:02:37 +0000 (13:02 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Sat, 25 Jul 2015 10:02:37 +0000 (13:02 +0300)
imp.reload() was deprecated in Python 3.4 and changed to call
importlib.reload().

Patch by Petr Viktorin.

Doc/reference/import.rst

index 7966bc5133370939af73fa95b1bfb34ccd9a08a1..16d28d8c73ecbe311ba403eafa60d16c2cfbeba5 100644 (file)
@@ -200,7 +200,7 @@ of the module to result in an :exc:`ImportError`.
 Beware though, as if you keep a reference to the module object,
 invalidate its cache entry in :data:`sys.modules`, and then re-import the
 named module, the two module objects will *not* be the same. By contrast,
-:func:`imp.reload` will reuse the *same* module object, and simply
+:func:`importlib.reload` will reuse the *same* module object, and simply
 reinitialise the module contents by rerunning the module's code.