summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/tarfile.py2
-rw-r--r--Misc/NEWS2
-rw-r--r--Tools/freeze/bkfile.py2
3 files changed, 4 insertions, 2 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index b0d1292..bc0b09f 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -41,6 +41,7 @@ __credits__ = "Gustavo Niemeyer, Niels Gustäbel, Richard Townsend."
#---------
# 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
diff --git a/Misc/NEWS b/Misc/NEWS
index a90db8e..8e97568 100644
--- 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.
diff --git a/Tools/freeze/bkfile.py b/Tools/freeze/bkfile.py
index 54af2fa..2fc19dc 100644
--- a/Tools/freeze/bkfile.py
+++ b/Tools/freeze/bkfile.py
@@ -1,4 +1,4 @@
-_orig_open = open
+from __builtin__ import open as _orig_open
class _BkFile:
def __init__(self, file, mode, bufsize):