Commit a1a287be authored by Guido van Rossum's avatar Guido van Rossum

Hack to avoid a nasty recursion issue when Python is invoked

in verbose mode: pre-import the Latin-1 and UTF-8 codecs
parent e074c34d
...@@ -405,6 +405,9 @@ def execsitecustomize(): ...@@ -405,6 +405,9 @@ def execsitecustomize():
def installnewio(): def installnewio():
"""Install new I/O library as default.""" """Install new I/O library as default."""
import io 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 # Trick so that open won't become a bound method when stored
# as a class variable (as dumbdbm does) # as a class variable (as dumbdbm does)
class open: class open:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment