mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Hack to avoid a nasty recursion issue when Python is invoked
in verbose mode: pre-import the Latin-1 and UTF-8 codecs
This commit is contained in:
parent
516f41e032
commit
f39317a972
1 changed files with 3 additions and 0 deletions
|
@ -405,6 +405,9 @@ def execsitecustomize():
|
|||
def installnewio():
|
||||
"""Install new I/O library as default."""
|
||||
import io
|
||||
# Hack to avoid a nasty recursion issue when Python is invoked
|
||||
# in verbose mode: pre-import the Latin-1 and UTF-8 codecs
|
||||
from encodings import latin_1, utf_8
|
||||
# Trick so that open won't become a bound method when stored
|
||||
# as a class variable (as dumbdbm does)
|
||||
class open:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue