• Guido van Rossum's avatar
    Minimal fix for the complaints about pickling Unicode objects. (SF · fb10c3f6
    Guido van Rossum yazdı
    bugs #126161 and 123634).
    
    The solution doesn't use the unicode-escape encoding; that has other
    problems (it seems not 100% reversible).  Rather, it transforms the
    input Unicode object slightly before encoding it using
    raw-unicode-escape, so that the decoding will reconstruct the original
    string: backslash and newline characters are translated into their
    \uXXXX counterparts.
    
    This is backwards incompatible for strings containing backslashes, but
    for some of those strings, the pickling was already broken.
    
    Note that SF bug #123634 complains specifically that cPickle fails to
    unpickle the pickle for u'' (the empty Unicode string) correctly.
    This was an off-by-one error in load_unicode().
    
    XXX Ugliness: in order to do the modified raw-unicode-escape, I've
    cut-and-pasted a copy of PyUnicode_EncodeRawUnicodeEscape() into this
    file that also encodes '\\' and '\n'.  It might be nice to migrate
    this into the Unicode implementation and give this encoding a new name
    ('half-raw-unicode-escape'? 'pickle-unicode-escape'?); that would help
    pickle.py too.  But right now I can't be bothered with the necessary
    infrastructural changes.
    fb10c3f6
Adı
Son kayıt (commit)
Son güncelleme
..
.cvsignore Loading commit data...
Makefile.pre.in Loading commit data...
Setup.config.in Loading commit data...
Setup.dist Loading commit data...
_codecsmodule.c Loading commit data...
_cursesmodule.c Loading commit data...
_localemodule.c Loading commit data...
_sre.c Loading commit data...
_tkinter.c Loading commit data...
almodule.c Loading commit data...
arraymodule.c Loading commit data...
audioop.c Loading commit data...
binascii.c Loading commit data...
bsddbmodule.c Loading commit data...
cPickle.c Loading commit data...
cStringIO.c Loading commit data...
ccpython.cc Loading commit data...
cdmodule.c Loading commit data...
cgen.py Loading commit data...
cgensupport.c Loading commit data...
cgensupport.h Loading commit data...
clmodule.c Loading commit data...
cmathmodule.c Loading commit data...
config.c.in Loading commit data...
cryptmodule.c Loading commit data...
cstubs Loading commit data...
dbmmodule.c Loading commit data...
dlmodule.c Loading commit data...
errnomodule.c Loading commit data...
fcntlmodule.c Loading commit data...
flmodule.c Loading commit data...
fmmodule.c Loading commit data...
fpectlmodule.c Loading commit data...
fpetestmodule.c Loading commit data...
gcmodule.c Loading commit data...
gdbmmodule.c Loading commit data...
getbuildinfo.c Loading commit data...
getpath.c Loading commit data...
glmodule.c Loading commit data...
grpmodule.c Loading commit data...
imageop.c Loading commit data...
imgfile.c Loading commit data...
ld_so_aix Loading commit data...
license.terms Loading commit data...
linuxaudiodev.c Loading commit data...
main.c Loading commit data...
makesetup Loading commit data...
makexp_aix Loading commit data...
mathmodule.c Loading commit data...
md5.h Loading commit data...
md5c.c Loading commit data...
md5module.c Loading commit data...
mmapmodule.c Loading commit data...
mpzmodule.c Loading commit data...
newmodule.c Loading commit data...
nismodule.c Loading commit data...
operator.c Loading commit data...
parsermodule.c Loading commit data...
pcre-int.h Loading commit data...
pcre.h Loading commit data...
pcremodule.c Loading commit data...
posixmodule.c Loading commit data...
puremodule.c Loading commit data...
pwdmodule.c Loading commit data...
pyexpat.c Loading commit data...
pypcre.c Loading commit data...
python.c Loading commit data...
readline.c Loading commit data...
regexmodule.c Loading commit data...
regexpr.c Loading commit data...
regexpr.h Loading commit data...
resource.c Loading commit data...
rgbimgmodule.c Loading commit data...
rotormodule.c Loading commit data...
selectmodule.c Loading commit data...
sgimodule.c Loading commit data...
shamodule.c Loading commit data...
signalmodule.c Loading commit data...
socketmodule.c Loading commit data...
soundex.c Loading commit data...
sre.h Loading commit data...
sre_constants.h Loading commit data...
stropmodule.c Loading commit data...
structmodule.c Loading commit data...
sunaudiodev.c Loading commit data...
svmodule.c Loading commit data...
syslogmodule.c Loading commit data...
tclNotify.c Loading commit data...
termios.c Loading commit data...
threadmodule.c Loading commit data...
timemodule.c Loading commit data...
timing.h Loading commit data...
timingmodule.c Loading commit data...
tkappinit.c Loading commit data...
ucnhash.c Loading commit data...
unicodedata.c Loading commit data...
unicodedata_db.h Loading commit data...
unicodedatabase.c Loading commit data...
unicodedatabase.h Loading commit data...
xxmodule.c Loading commit data...
yuv.h Loading commit data...
yuvconvert.c Loading commit data...
zlibmodule.c Loading commit data...