Staging
v0.5.1
https://github.com/python/cpython
Revision 1e42ab6e434044fdfcdc99b5b631ed972825a92c authored by Thomas Wouters on 23 January 2007, 15:09:19 UTC, committed by Thomas Wouters on 23 January 2007, 15:09:19 UTC
SF patch #1630975: Fix crash when replacing sys.stdout in sitecustomize

When running the interpreter in an environment that would cause it to set
stdout/stderr/stdin's encoding, having a sitecustomize that would replace
them with something other than PyFile objects would crash the interpreter.
Fix it by simply ignoring the encoding-setting for non-files.

This could do with a test, but I can think of no maintainable and portable
way to test this bug, short of adding a sitecustomize.py to the buildsystem
and have it always run with it (hmmm....)
1 parent 741e0bb
History
Tip revision: 1e42ab6e434044fdfcdc99b5b631ed972825a92c authored by Thomas Wouters on 23 January 2007, 15:09:19 UTC
Backport trunk revision 53527:
Tip revision: 1e42ab6
File Mode Size
Modules
Python
support
Makefile -rw-r--r-- 14.5 KB
README -rw-r--r-- 1.2 KB
pyconfig.h -rw-r--r-- 17.5 KB
sleep.c -rw-r--r-- 866 bytes
unixstuff.c -rw-r--r-- 1.7 KB
unixstuff.h -rw-r--r-- 318 bytes

README

back to top