summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pickle.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #15513: Added a __sizeof__ implementation for pickle classes.Serhiy Storchaka2014-12-161-1/+69
|
* Issue #6784: Strings from Python 2 can now be unpickled as bytes objects.Alexandre Vassalotti2013-12-071-0/+4
| | | | | | | Initial patch by Merlijn van Deen. I've added a few unrelated docstring fixes in the patch while I was at it, which makes the documentation for pickle a bit more consistent.
* Issue #18339: use with self.assertRaises() to make test case more readableChristian Heimes2013-07-011-2/+4
|
* Issue #18339: Negative ints keys in unpickler.memo dict no longer cause aChristian Heimes2013-07-011-0/+7
| | | | segfault inside the _pickle C extension.
* Issue #14166: Pickler objects now have an optional `dispatch_table` ↵Antoine Pitrou2012-03-041-1/+27
| | | | | | attribute which allows to set custom per-pickler reduction functions. Patch by sbt.
* Issue #11564: Avoid crashes when trying to pickle huge objects or containersAntoine Pitrou2011-08-291-3/+4
| | | | (more than 2**31 items). Instead, in most cases, an OverflowError is raised.
* Merged revisions 88546 via svnmerge fromAlexander Belopolsky2011-02-241-6/+6
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88546 | alexander.belopolsky | 2011-02-24 14:40:09 -0500 (Thu, 24 Feb 2011) | 3 lines Issue #11286: Fixed unpickling of empty 2.x strings. ........
* Issue #9410: Various optimizations to the pickle module, leading toAntoine Pitrou2010-09-091-1/+14
| | | | | speedups up to 4x (depending on the benchmark). Mostly ported from Unladen Swallow; initial patch by Alexandre Vassalotti.
* Port r71408 to py3k: issue 5665, add more pickling tests.Collin Winter2009-04-161-1/+23
|
* Restore _pickle module accelerator module.Alexandre Vassalotti2008-06-121-19/+34
| | | | | Removed Windows support temporarily. 64bit bug with integer unpickling is now fixed.
* revert the addition of _pickle because it was causing havok with 64-bitBenjamin Peterson2008-06-121-34/+19
|
* Issue 2917: Merge the pickle and cPickle module.Alexandre Vassalotti2008-06-111-19/+34
|
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-3/+3
|
* - A new pickle protocol (protocol 3) is added with explicit supportGuido van Rossum2008-03-171-9/+3
| | | | | | | | | | | | | 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.
* Merged revisions 60990-61002 via svnmerge fromChristian Heimes2008-02-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r60990 | eric.smith | 2008-02-23 17:05:26 +0100 (Sat, 23 Feb 2008) | 1 line Removed duplicate Py_CHARMASK define. It's already defined in Python.h. ........ r60991 | andrew.kuchling | 2008-02-23 17:23:05 +0100 (Sat, 23 Feb 2008) | 4 lines #1330538: Improve comparison of xmlrpclib.DateTime and datetime instances. Remove automatic handling of datetime.date and datetime.time. This breaks backward compatibility, but python-dev discussion was strongly against this automatic conversion; see the bug for a link. ........ r60994 | andrew.kuchling | 2008-02-23 17:39:43 +0100 (Sat, 23 Feb 2008) | 1 line #835521: Add index entries for various pickle-protocol methods and attributes ........ r60995 | andrew.kuchling | 2008-02-23 18:10:46 +0100 (Sat, 23 Feb 2008) | 2 lines #1433694: minidom's .normalize() failed to set .nextSibling for last element. Fix by Malte Helmert ........ r61000 | christian.heimes | 2008-02-23 18:40:11 +0100 (Sat, 23 Feb 2008) | 1 line Patch #2167 from calvin: Remove unused imports ........ r61001 | christian.heimes | 2008-02-23 18:42:31 +0100 (Sat, 23 Feb 2008) | 1 line Patch #1957: syslogmodule: Release GIL when calling syslog(3) ........ r61002 | christian.heimes | 2008-02-23 18:52:07 +0100 (Sat, 23 Feb 2008) | 2 lines Issue #2051 and patch from Alexander Belopolsky: Permission for pyc and pyo files are inherited from the py file. ........
* Merging the py3k-pep3137 branch back into the py3k branch.Guido van Rossum2007-11-061-3/+3
| | | | | | | | | | | | | | No detailed change log; just check out the change log for the py3k-pep3137 branch. The most obvious changes: - str8 renamed to bytes (PyString at the C level); - bytes renamed to buffer (PyBytes at the C level); - PyString and PyUnicode are no longer compatible. I.e. we now have an immutable bytes type and a mutable bytes type. The behavior of PyString was modified quite a bit, to make it more bytes-like. Some changes are still on the to-do list.
* Got test_pickletools and test_pickle working.Guido van Rossum2007-05-081-6/+6
| | | | (Alas, test_cpickle is still broken.)
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-6/+5
| | | | | | | | | | and test_support.run_classtests() into run_unittest() and use it wherever possible. Also don't use "from test.test_support import ...", but "from test import test_support" in a few spots. From SF patch #662807.
* cPickle.c, load_build(): Taught cPickle how to pick apartTim Peters2003-02-151-2/+1
| | | | | | | | | | | | | | | | | | 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.
* pickle.py has a few doctest'ed internal functions, so run their tests.Tim Peters2003-01-301-0/+1
|
* Implement appropriate __getnewargs__ for all immutable subclassable builtinGuido van Rossum2003-01-291-5/+13
| | | | | | | | types. The special handling for these can now be removed from save_newobj(). Add some testing for this. Also add support for setting the 'fast' flag on the Python Pickler class, which suppresses use of the memo.
* Temporary hacks to arrange that the pickle tests relying on protocol 2Tim Peters2003-01-281-3/+7
| | | | | | only get run by test_pickle.py now (& not by test_cpickle.py). This should be undone when protocol 2 is implemented in cPickle too. test_cpickle should pass again.
* Rename 'bin' arg to 'proto'. Keep the default at 0 lest the testsGuido van Rossum2003-01-281-4/+4
| | | | change in meaning.
* Remove inst_persistent_id() WANNI (we ain't never needed it).Jeremy Hylton2002-11-131-1/+23
| | | | Add some simple tests of the persistence hooks.
* Complete the absolute import patch for the test suite. All relativeBarry Warsaw2002-07-301-1/+1
| | | | | | | | imports of test modules now import from the test package. Other related oddities are also fixed (like DeprecationWarning filters that weren't specifying the full import part, etc.). Also did a general code cleanup to remove all "from test.test_support import *"'s. Other from...import *'s weren't changed.
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-1/+1
| | | | | | | | | | | imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :)
* Fix the test control support for the pickle & cPickle tests so the tests runFred Drake2001-12-191-3/+10
| | | | under regrtest.
* Whitespace normalization.Tim Peters2001-10-181-1/+1
|
* Covert pickle tests to use unittest.Jeremy Hylton2001-10-151-2/+32
| | | | | Extend tests to cover a few more cases. For cPickle, test several of the undocumented features.
* Reorganize pickle/cPickle testing so the tests pass regardless of the orderTim Peters2001-01-221-154/+2
| | | | they're run.
* Test some Unicode pickling endcases.Guido van Rossum2000-12-191-0/+12
|
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-1/+1
|
* - plug a memory leak due to circular listsNeil Schemenauer2000-09-221-0/+3
|
* Fix Bug #114293:Jeremy Hylton2000-09-151-7/+72
| | | | | | | | | | | 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
* Basic regr tests for pickle/cPickleGuido van Rossum1999-03-251-0/+75