diff options
author | Guido van Rossum <guido@python.org> | 2007-08-09 22:51:04 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-09 22:51:04 +0000 |
commit | a1a287be9e85b3076c1d057cd4e9faa83f31904f (patch) | |
tree | 652553823120b9944f8c7a1be705d66cb59d85ad /Lib | |
parent | e074c34d96ee04e1ffb45da6bd87a33a6c3179a6 (diff) | |
download | cpython-a1a287be9e85b3076c1d057cd4e9faa83f31904f.tar.gz |
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')
-rw-r--r-- | Lib/site.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/site.py b/Lib/site.py index f7ca83b380..1d3183af3a 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: |