Staging
v0.8.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
abstract.c -rw-r--r-- 48.1 KB
boolobject.c -rw-r--r-- 4.8 KB
bufferobject.c -rw-r--r-- 13.7 KB
cellobject.c -rw-r--r-- 2.3 KB
classobject.c -rw-r--r-- 61.3 KB
cobject.c -rw-r--r-- 3.9 KB
complexobject.c -rw-r--r-- 22.9 KB
descrobject.c -rw-r--r-- 30.1 KB
dictnotes.txt -rw-r--r-- 10.9 KB
dictobject.c -rw-r--r-- 57.7 KB
enumobject.c -rw-r--r-- 8.4 KB
fileobject.c -rw-r--r-- 58.4 KB
floatobject.c -rw-r--r-- 33.5 KB
frameobject.c -rw-r--r-- 21.9 KB
funcobject.c -rw-r--r-- 21.4 KB
genobject.c -rw-r--r-- 2.9 KB
intobject.c -rw-r--r-- 27.3 KB
iterobject.c -rw-r--r-- 5.4 KB
listobject.c -rw-r--r-- 68.3 KB
listsort.txt -rw-r--r-- 30.7 KB
longobject.c -rw-r--r-- 72.8 KB
methodobject.c -rw-r--r-- 8.1 KB
moduleobject.c -rw-r--r-- 6.2 KB
object.c -rw-r--r-- 48.3 KB
obmalloc.c -rw-r--r-- 44.5 KB
rangeobject.c -rw-r--r-- 9.1 KB
setobject.c -rw-r--r-- 26.0 KB
sliceobject.c -rw-r--r-- 7.5 KB
stringobject.c -rw-r--r-- 103.3 KB
structseq.c -rw-r--r-- 9.5 KB
tupleobject.c -rw-r--r-- 19.5 KB
typeobject.c -rw-r--r-- 147.8 KB
unicodectype.c -rw-r--r-- 8.4 KB
unicodeobject.c -rw-r--r-- 189.2 KB
unicodetype_db.h -rw-r--r-- 75.4 KB
weakrefobject.c -rw-r--r-- 28.5 KB

back to top