]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #23615: Module tarfile is now can be reloaded with imp.reload().
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 11 Mar 2015 15:31:59 +0000 (17:31 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 11 Mar 2015 15:31:59 +0000 (17:31 +0200)
Lib/tarfile.py
Misc/NEWS
Tools/freeze/bkfile.py

index b0d1292783381e49c7667da3c0233240f9e9cc8b..bc0b09fa88cd29e0c2884008e96070eaa3d373ce 100644 (file)
@@ -41,6 +41,7 @@ __credits__ = "Gustavo Niemeyer, Niels Gust
 #---------
 # Imports
 #---------
+from __builtin__ import open as bltn_open
 import sys
 import os
 import shutil
@@ -2611,5 +2612,4 @@ def is_tarfile(name):
     except TarError:
         return False
 
-bltn_open = open
 open = TarFile.open
index a90db8e39ab58bc24c4fe4c38049601ce9e181b1..8e97568dd138facca2ad3312b2fc3b5f3ccf937b 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -21,6 +21,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #23615: Module tarfile is now can be reloaded with imp.reload().
+
 - Issue #22853: Fixed a deadlock when use multiprocessing.Queue at import time.
   Patch by Florian Finkernagel and Davin Potts.
 
index 54af2fac8952a0e000a184efe279fed4a8fd425b..2fc19dc1195291e17b01b5d02aedbc1701207808 100644 (file)
@@ -1,4 +1,4 @@
-_orig_open = open
+from __builtin__ import open as _orig_open
 
 class _BkFile:
     def __init__(self, file, mode, bufsize):