[Python-3000-checkins] r56878 - python/branches/py3k/Lib/site.py

guido.van.rossum python-3000-checkins at python.org
Fri Aug 10 00:51:28 CEST 2007


Author: guido.van.rossum
Date: Fri Aug 10 00:51:04 2007
New Revision: 56878

Modified:
   python/branches/py3k/Lib/site.py
Log:
Hack to avoid a nasty recursion issue when Python is invoked
in verbose mode: pre-import the Latin-1 and UTF-8 codecs


Modified: python/branches/py3k/Lib/site.py
==============================================================================
--- python/branches/py3k/Lib/site.py	(original)
+++ python/branches/py3k/Lib/site.py	Fri Aug 10 00:51:04 2007
@@ -405,6 +405,9 @@
 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:


More information about the Python-3000-checkins mailing list