summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pickletools.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2008-03-17 22:56:06 (GMT)
committerGuido van Rossum <guido@python.org>2008-03-17 22:56:06 (GMT)
commitf41698169198b32eecd60337a9437ea8c1714380 (patch)
treec7e6d48433cd32bcb489a4b2100353f2edf42b79 /Lib/test/test_pickletools.py
parent953e4e52c4fb63e501bcbaa97db857de9c159cf5 (diff)
downloadcpython-f41698169198b32eecd60337a9437ea8c1714380.zip
cpython-f41698169198b32eecd60337a9437ea8c1714380.tar.gz
cpython-f41698169198b32eecd60337a9437ea8c1714380.tar.bz2
- A new pickle protocol (protocol 3) is added with explicit support
for bytes. This is the default protocol. It intentionally cannot be unpickled by Python 2.x. - When a pickle written by Python 2.x contains an (8-bit) str instance, this is now decoded to a (Unicode) str instance. The encoding used to do this defaults to ASCII, but can be overridden via two new keyword arguments to the Unpickler class. Previously this would create bytes instances, which is usually wrong: str instances are often used to pickle attribute names etc., and text is more common than binary data anyway.
Diffstat (limited to 'Lib/test/test_pickletools.py')
-rw-r--r--Lib/test/test_pickletools.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_pickletools.py b/Lib/test/test_pickletools.py
index 3e5b35a..932dcd1 100644
--- a/Lib/test/test_pickletools.py
+++ b/Lib/test/test_pickletools.py
@@ -6,7 +6,7 @@ from test.pickletester import AbstractPickleModuleTests
class OptimizedPickleTests(AbstractPickleTests, AbstractPickleModuleTests):
- def dumps(self, arg, proto=0, fast=0):
+ def dumps(self, arg, proto=None):
return pickletools.optimize(pickle.dumps(arg, proto))
def loads(self, buf):