Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r84830:0cf72d549dbb
Date: 2016-05-30 13:07 +0200
http://bitbucket.org/pypy/pypy/changeset/0cf72d549dbb/

Log:    Issue #2314: very obscure fix

diff --git a/pypy/interpreter/app_main.py b/pypy/interpreter/app_main.py
--- a/pypy/interpreter/app_main.py
+++ b/pypy/interpreter/app_main.py
@@ -583,6 +583,12 @@
         if hasattr(signal, 'SIGXFSZ'):
             signal.signal(signal.SIGXFSZ, signal.SIG_IGN)
 
+    # Pre-load the default encoder (controlled by PYTHONIOENCODING)
+    # now.  This is needed before someone mucks up with sys.path (or
+    # even adds a unicode string to it, leading to infnite recursion).
+    # Note: very obscure.  Issue #2314.
+    str(u'')
+
     def inspect_requested():
         # We get an interactive prompt in one of the following three cases:
         #
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to