summaryrefslogtreecommitdiffstats
path: root/Lib/site.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-09 22:51:04 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-09 22:51:04 (GMT)
commitf39317a972568f66191867e833f5b2b3963caaa6 (patch)
tree2e570daff796ca13868f8397cb054008ca507198 /Lib/site.py
parent516f41e032e612e5bc6b7093ac31215abbe8f31d (diff)
downloadcpython-f39317a972568f66191867e833f5b2b3963caaa6.zip
cpython-f39317a972568f66191867e833f5b2b3963caaa6.tar.gz
cpython-f39317a972568f66191867e833f5b2b3963caaa6.tar.bz2
Hack to avoid a nasty recursion issue when Python is invoked
in verbose mode: pre-import the Latin-1 and UTF-8 codecs
Diffstat (limited to 'Lib/site.py')
-rw-r--r--Lib/site.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/site.py b/Lib/site.py
index f7ca83b..1d3183a 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -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: