mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
cPickle.c, load_build(): Taught cPickle how to pick apart
the optional proto 2 slot state. pickle.py, load_build(): CAUTION: Noted that cPickle's load_build and pickle's load_build really don't do the same things with the state, and didn't before this patch either. cPickle never tries to do .update(), and has no backoff if instance.__dict__ can't be retrieved. There are no tests that can tell the difference, and part of what cPickle's load_build() did looked accidental to me, so I don't know what the true intent is here. pickletester.py, test_pickle.py: Got rid of the hack for exempting cPickle from running some of the proto 2 tests. dictobject.c, PyDict_Next(): documented intended use.
This commit is contained in:
parent
d2c684f79f
commit
080c88b912
5 changed files with 90 additions and 32 deletions
|
@ -5,11 +5,10 @@ from cStringIO import StringIO
|
|||
from test import test_support
|
||||
|
||||
from test.pickletester import AbstractPickleTests
|
||||
from test.pickletester import TempAbstractPickleTests as XXXTemp
|
||||
from test.pickletester import AbstractPickleModuleTests
|
||||
from test.pickletester import AbstractPersistentPicklerTests
|
||||
|
||||
class PickleTests(AbstractPickleTests, AbstractPickleModuleTests, XXXTemp):
|
||||
class PickleTests(AbstractPickleTests, AbstractPickleModuleTests):
|
||||
|
||||
def dumps(self, arg, proto=0, fast=0):
|
||||
# Ignore fast
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue