mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded with
imp.reload(). Patch by Thomas Kluyver.
This commit is contained in:
parent
13be8c2691
commit
cf4a2f29ad
5 changed files with 7 additions and 6 deletions
|
@ -24,6 +24,7 @@ __author__ = 'Ka-Ping Yee <ping@lfw.org>'
|
|||
__credits__ = ('GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, '
|
||||
'Skip Montanaro, Raymond Hettinger, Trent Nelson, '
|
||||
'Michael Foord')
|
||||
from builtins import open as _builtin_open
|
||||
from codecs import lookup, BOM_UTF8
|
||||
import collections
|
||||
from io import TextIOWrapper
|
||||
|
@ -429,8 +430,6 @@ def detect_encoding(readline):
|
|||
return default, [first, second]
|
||||
|
||||
|
||||
_builtin_open = open
|
||||
|
||||
def open(filename):
|
||||
"""Open a file in read only mode using the encoding detected by
|
||||
detect_encoding().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue