Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded with

imp.reload().  Patch by Thomas Kluyver.
This commit is contained in:
Serhiy Storchaka 2015-03-11 17:31:33 +02:00
commit ca8b64461d
5 changed files with 7 additions and 6 deletions

View file

@ -38,6 +38,7 @@ __credits__ = "Gustavo Niemeyer, Niels Gust\u00e4bel, Richard Townsend."
#---------
# Imports
#---------
from builtins import open as bltn_open
import sys
import os
import io
@ -2433,7 +2434,6 @@ def is_tarfile(name):
except TarError:
return False
bltn_open = open
open = TarFile.open