mirror of
https://github.com/python/cpython.git
synced 2026-01-02 13:33:44 +00:00
Strings are unpickled by calling eval on the string's repr. This
change makes pickle work like cPickle; it checks if the pickled
string is safe to eval and raises ValueError if it is not.
test suite modifications:
Verify that pickle catches a variety of insecure string pickles
Make test_pickle and test_cpickle use exactly the same test suite
Add test for pickling recursive object
13 lines
120 B
Text
13 lines
120 B
Text
test_pickle
|
|
dumps()
|
|
loads()
|
|
ok
|
|
loads() DATA
|
|
ok
|
|
dumps() binary
|
|
loads() binary
|
|
ok
|
|
loads() BINDATA
|
|
ok
|
|
dumps() RECURSIVE
|
|
ok
|