From: Serhiy Storchaka Date: Wed, 11 Mar 2015 15:31:59 +0000 (+0200) Subject: Issue #23615: Module tarfile is now can be reloaded with imp.reload(). X-Git-Tag: v2.7.10rc1~132 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=205408dacb7844c86e49372f0f25a7018341c2b7;p=thirdparty%2FPython%2Fcpython.git Issue #23615: Module tarfile is now can be reloaded with imp.reload(). --- diff --git a/Lib/tarfile.py b/Lib/tarfile.py index b0d129278338..bc0b09fa88cd 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -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 diff --git a/Misc/NEWS b/Misc/NEWS index a90db8e39ab5..8e97568dd138 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 54af2fac8952..2fc19dc11952 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):