Message153718
OK, this is the pickle.py patch. A new parameter 'bytestr' has been added to both _Pickler and _Unpickler to toggle the pickle.string<=>bytes behaviour:
_Pickler:
IF protocol <= 2 AND bytestr=True
THEN bytes are stored as STRING/SHORT_BINSTRING/BINSTRING
ELSE (the old behaviour; obj for protocol <=2, else BINARY)
_Unpickler:
IF bytestr=True
THEN STRING/SHORT_BINSTRING/BINSTRING are read as bytes
ELSE they are read as str (old behaviour)
I also extracted the decoding stuff from the three string reading functions to a single one. |
|
Date |
User |
Action |
Args |
2012-02-19 19:08:10 | valhallasw | set | recipients:
+ valhallasw, gvanrossum, loewis, georg.brandl, jcea, ggenellina, pitrou, alexandre.vassalotti, RonnyPfannschmidt, jdharper, Ronny.Pfannschmidt |
2012-02-19 19:08:10 | valhallasw | set | messageid: <1329678490.57.0.0127552207963.issue6784@psf.upfronthosting.co.za> |
2012-02-19 19:08:10 | valhallasw | link | issue6784 messages |
2012-02-19 19:08:09 | valhallasw | create | |
|