summaryrefslogtreecommitdiffstats
path: root/Lib/pickle.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixes #13842: cannot pickle Ellipsis or NotImplemented.Łukasz Langa2012-03-121-0/+8
| | | | Thanks for James Sanders for the bug report and the patch.
* Issue #14166: Pickler objects now have an optional `dispatch_table` ↵Antoine Pitrou2012-03-041-2/+2
| | | | | | attribute which allows to set custom per-pickler reduction functions. Patch by sbt.
* Merge 3.2Alexandre Vassalotti2011-12-131-1/+5
|\
| * Issue #13505: Make pickling of bytes object compatible with Python 2.Alexandre Vassalotti2011-12-131-1/+5
| | | | | | | | Initial patch by sbt.
* | Issue #13575: there is only one class type.Florent Xicluna2011-12-121-1/+1
| |
* | Remove redundant imports.Florent Xicluna2011-11-041-1/+1
| |
* | Merge 3.2Florent Xicluna2011-10-281-1/+1
|\ \ | |/
| * Closes #13258: Use callable() built-in in the standard library.Florent Xicluna2011-10-281-1/+1
| |
* | Issue #7689: Allow pickling of dynamically created classes when theirAntoine Pitrou2011-10-041-9/+9
|\ \ | |/ | | | | | | metaclass is registered with copyreg. Patch by Nicolas M. Thiéry and Craig Citro.
| * Issue #7689: Allow pickling of dynamically created classes when theirAntoine Pitrou2011-10-041-9/+9
| | | | | | | | | | metaclass is registered with copyreg. Patch by Nicolas M. Thiéry and Craig Citro.
* | Issue #12847: Fix a crash with negative PUT and LONG_BINPUT arguments inAntoine Pitrou2011-08-291-0/+6
|\ \ | |/ | | | | the C pickle implementation.
| * Issue #12847: Fix a crash with negative PUT and LONG_BINPUT arguments inAntoine Pitrou2011-08-291-0/+6
| | | | | | | | the C pickle implementation.
* | remove __version__s dependent on subversion keyword expansion (closes #12221)Benjamin Peterson2011-06-011-2/+0
|/
* Issue #9410: Various optimizations to the pickle module, leading toAntoine Pitrou2010-09-091-6/+6
| | | | | speedups up to 4x (depending on the benchmark). Mostly ported from Unladen Swallow; initial patch by Alexandre Vassalotti.
* Issue #9378: python -m pickle <pickle file> will now load and displayAlexander Belopolsky2010-07-271-1/+23
| | | | the first object in the pickle file.
* Issue #5180: Fixed a bug that prevented loading 2.x pickles in 3.xAlexander Belopolsky2010-07-171-16/+5
| | | | python when they contain instances of old-style classes.
* Issue #8383: pickle and pickletools use surrogatepass error handler whenVictor Stinner2010-04-131-2/+2
| | | | | encoding unicode as utf8 to support lone surrogates and stay compatible with Python 2.x and 3.0
* Simplified long coding in pickle.py.Alexandre Vassalotti2010-01-121-51/+7
|
* Issue #6137: The pickle module now translates module names when loadingAntoine Pitrou2009-06-041-16/+40
| | | | | | or dumping pickles with a 2.x-compatible protocol, in order to make data sharing and migration easier. This behaviour can be disabled using the new `fix_imports` optional argument.
* Only try to intern str objects when unpickling attributes.Alexandre Vassalotti2009-05-251-8/+6
| | | | This matches the behaviour implmented in _pickle.
* Merged revisions 72223 via svnmerge fromAntoine Pitrou2009-05-021-1/+9
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72223 | antoine.pitrou | 2009-05-02 23:13:23 +0200 (sam., 02 mai 2009) | 5 lines Isue #5084: unpickling now interns the attribute names of pickled objects, saving memory and avoiding growth in size of subsequent pickles. Proposal and original patch by Jake McGuire. ........
* Issue #4842, patch 1/2: fix pickle in Python 3.x so that pickling with theMark Dickinson2009-01-201-1/+3
| | | | | | 'L' opcode always appends an 'L' on output, just as 2.x does. When unpickling, remove the trailing 'L' (if present) before passing the result to PyLong_FromString.
* fix typo #4904Benjamin Peterson2009-01-101-1/+1
|
* Fix issue #4374: Pickle tests fail w/o _pickle extension.Alexandre Vassalotti2008-12-271-0/+10
| | | | Add an initialization check to mimic the interface of _pickle.
* Sorry, r67092 is commit miss....Hirokazu Yamamoto2008-11-041-13/+0
|
* Blocked revisions 67002 via svnmergeHirokazu Yamamoto2008-11-041-0/+13
| | | | | | | | ........ r67002 | hirokazu.yamamoto | 2008-10-23 09:37:33 +0900 | 1 line Issue #4183: Some tests didn't run with pickle.HIGHEST_PROTOCOL. ........
* Remove a confusing statement in Pickler's docstring.Alexandre Vassalotti2008-10-251-2/+0
| | | | Pickler does not read anything from the given file.
* Restore _pickle module accelerator module.Alexandre Vassalotti2008-06-121-83/+71
| | | | | 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-71/+83
|
* Removed exception renaming cruft in pickle.py.Alexandre Vassalotti2008-06-111-3/+0
|
* Issue 2917: Merge the pickle and cPickle module.Alexandre Vassalotti2008-06-111-83/+74
|
* Change Pickler._batch_appends() and Pickler._batch_setitems() to takeAlexandre Vassalotti2008-05-141-2/+4
| | | | an iterable object, instead of an iterator.
* Rename copy_reg module to copyreg.Alexandre Vassalotti2008-05-111-4/+4
| | | | | | | | | | | | | | | Updated documentation. Merged revisions 63042 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63042 | alexandre.vassalotti | 2008-05-11 04:25:28 -0400 (Sun, 11 May 2008) | 5 lines Added module stub for copy_reg renaming in 3.0. Renamed copy_reg to copyreg in the standard library, to avoid spurious warnings and ease later merging to py3k branch. Public documentation remains intact. ........
* Removed memoryview objects from bytes_types.Alexandre Vassalotti2008-05-031-1/+1
| | | | | | memoryview objects have a different API (such as for indexing) than bytes and bytesarray objects, so memoryview objects shouldn't be treated blindly as "bytes" objects.
* - A new pickle protocol (protocol 3) is added with explicit supportGuido van Rossum2008-03-171-19/+45
| | | | | | | | | | | | | 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.
* Rename buffer -> bytearray.Guido van Rossum2007-11-211-1/+1
|
* Merging the py3k-pep3137 branch back into the py3k branch.Guido van Rossum2007-11-061-14/+18
| | | | | | | | | | | | | | 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.
* Patch# 1258 by Christian Heimes: kill basestring.Guido van Rossum2007-10-161-1/+1
| | | | I like this because it makes the code shorter! :-)
* Random changes having to do with readline() and bytes.Guido van Rossum2007-10-101-25/+14
|
* More str/bytes fixes.Guido van Rossum2007-08-271-6/+6
|
* Changes in anticipation of stricter str vs. bytes enforcement.Guido van Rossum2007-08-271-8/+9
|
* Getting rid of cPickle. Mmm, feels good!Guido van Rossum2007-07-201-6/+7
|
* Fix test_pickle, by reverting the string opcodes (S, T, U) to returningGuido van Rossum2007-07-191-17/+3
| | | | | | | | strings, in Latin-1. Bytes are once more pickled through bytes.__reduce__, but now it returns "latin-1" as the second parameter. Unfortunately this breaks datetime pickling. I'll have to investigate further; reverting Martin's changes doesn't seem to help.
* Change Py_BuildValue to generate Unicode objects forMartin v. Löwis2007-07-181-3/+17
| | | | | | | | 's' and 'c' codes. Change pickle to dump bytes objects using the 'S' code, and to load the 'S' code as byte objects. Change datetime and array to generate and expect bytes objects in reduce/unreduce.
* Fix some problems introduced by the str8 repr change.Guido van Rossum2007-06-151-1/+2
|
* Rip out all codecs that can't work in a unicode/bytes world:Walter Dörwald2007-06-121-1/+2
| | | | | | | | base64, uu, zlib, rot_13, hex, quopri, bz2, string_escape. However codecs.escape_encode() and codecs.escape_decode() still exist, as they are used for pickling str8 objects (so those two functions can go, when the str8 type is removed).
* Merged revisions 55795-55816 via svnmerge fromGuido van Rossum2007-06-071-15/+14
| | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r55797 | neal.norwitz | 2007-06-07 00:00:57 -0700 (Thu, 07 Jun 2007) | 3 lines Get rid of some remnants of classic classes. types.ClassType == type. Also get rid of almost all uses of the types module and use the builtin name. ........ r55798 | neal.norwitz | 2007-06-07 00:12:36 -0700 (Thu, 07 Jun 2007) | 1 line Remove a use of types, verify commit hook works ........ r55809 | guido.van.rossum | 2007-06-07 11:11:29 -0700 (Thu, 07 Jun 2007) | 2 lines Fix syntax error introduced by Neal in last checkin. ........
* Merged revisions 55407-55513 via svnmerge fromGuido van Rossum2007-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ................ r55413 | fred.drake | 2007-05-17 12:30:10 -0700 (Thu, 17 May 2007) | 1 line fix argument name in documentation; match the implementation ................ r55430 | jack.diederich | 2007-05-18 06:39:59 -0700 (Fri, 18 May 2007) | 1 line Implements class decorators, PEP 3129. ................ r55432 | guido.van.rossum | 2007-05-18 08:09:41 -0700 (Fri, 18 May 2007) | 2 lines obsubmit. ................ r55434 | guido.van.rossum | 2007-05-18 09:39:10 -0700 (Fri, 18 May 2007) | 3 lines Fix bug in test_inspect. (I presume this is how it should be fixed; Jack Diedrich, please verify.) ................ r55460 | brett.cannon | 2007-05-20 00:31:57 -0700 (Sun, 20 May 2007) | 4 lines Remove the imageop module. With imgfile already removed in Python 3.0 and rgbimg gone in Python 2.6 the unit tests themselves were made worthless. Plus third-party libraries perform the same function much better. ................ r55469 | neal.norwitz | 2007-05-20 11:28:20 -0700 (Sun, 20 May 2007) | 118 lines Merged revisions 55324-55467 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r55348 | georg.brandl | 2007-05-15 13:19:34 -0700 (Tue, 15 May 2007) | 4 lines HTML-escape the plain traceback in cgitb's HTML output, to prevent the traceback inadvertently or maliciously closing the comment and injecting HTML into the error page. ........ r55372 | neal.norwitz | 2007-05-15 21:33:50 -0700 (Tue, 15 May 2007) | 6 lines Port rev 55353 from Guido: Add what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC() fails. Will backport. ........ r55377 | neal.norwitz | 2007-05-15 22:06:33 -0700 (Tue, 15 May 2007) | 1 line Mention removal of some directories for obsolete platforms ........ r55380 | brett.cannon | 2007-05-15 22:50:03 -0700 (Tue, 15 May 2007) | 2 lines Change the maintainer of the BeOS port. ........ r55383 | georg.brandl | 2007-05-16 06:44:18 -0700 (Wed, 16 May 2007) | 2 lines Bug #1719995: don't use deprecated method in sets example. ........ r55386 | neal.norwitz | 2007-05-16 13:05:11 -0700 (Wed, 16 May 2007) | 5 lines Fix bug in marshal where bad data would cause a segfault due to lack of an infinite recursion check. Contributed by Damien Miller at Google. ........ r55389 | brett.cannon | 2007-05-16 15:42:29 -0700 (Wed, 16 May 2007) | 6 lines Remove the gopherlib module. It has been raising a DeprecationWarning since Python 2.5. Also remove gopher support from urllib/urllib2. As both imported gopherlib the usage of the support would have raised a DeprecationWarning. ........ r55394 | raymond.hettinger | 2007-05-16 18:08:04 -0700 (Wed, 16 May 2007) | 1 line calendar.py gets no benefit from xrange() instead of range() ........ r55395 | brett.cannon | 2007-05-16 19:02:56 -0700 (Wed, 16 May 2007) | 3 lines Complete deprecation of BaseException.message. Some subclasses were directly accessing the message attribute instead of using the descriptor. ........ r55396 | neal.norwitz | 2007-05-16 23:11:36 -0700 (Wed, 16 May 2007) | 4 lines Reduce the max stack depth to see if this fixes the segfaults on Windows and some other boxes. If this is successful, this rev should be backported. I'm not sure how close to the limit we should push this. ........ r55397 | neal.norwitz | 2007-05-16 23:23:50 -0700 (Wed, 16 May 2007) | 4 lines Set the depth to something very small to try to determine if the crashes on Windows are really due to the stack size or possibly some other problem. ........ r55398 | neal.norwitz | 2007-05-17 00:04:46 -0700 (Thu, 17 May 2007) | 4 lines Last try for tweaking the max stack depth. 5000 was the original value, 4000 didn't work either. 1000 does work on Windows. If 2000 works, that will hopefully be a reasonable balance. ........ r55412 | fred.drake | 2007-05-17 12:29:58 -0700 (Thu, 17 May 2007) | 1 line fix argument name in documentation; match the implementation ........ r55427 | neal.norwitz | 2007-05-17 22:47:16 -0700 (Thu, 17 May 2007) | 1 line Verify neither dumps or loads overflow the stack and segfault. ........ r55446 | collin.winter | 2007-05-18 16:11:24 -0700 (Fri, 18 May 2007) | 1 line Backport PEP 3110's new 'except' syntax to 2.6. ........ r55448 | raymond.hettinger | 2007-05-18 18:11:16 -0700 (Fri, 18 May 2007) | 1 line Improvements to NamedTuple's implementation, tests, and documentation ........ r55449 | raymond.hettinger | 2007-05-18 18:50:11 -0700 (Fri, 18 May 2007) | 1 line Fix beginner mistake -- don't mix spaces and tabs. ........ r55450 | neal.norwitz | 2007-05-18 20:48:47 -0700 (Fri, 18 May 2007) | 1 line Clear data so random memory does not get freed. Will backport. ........ r55452 | neal.norwitz | 2007-05-18 21:34:55 -0700 (Fri, 18 May 2007) | 3 lines Whoops, need to pay attention to those test failures. Move the clear to *before* the first use, not after. ........ r55453 | neal.norwitz | 2007-05-18 21:35:52 -0700 (Fri, 18 May 2007) | 1 line Give some clue as to what happened if the test fails. ........ r55455 | georg.brandl | 2007-05-19 11:09:26 -0700 (Sat, 19 May 2007) | 2 lines Fix docstring for add_package in site.py. ........ r55458 | brett.cannon | 2007-05-20 00:09:50 -0700 (Sun, 20 May 2007) | 2 lines Remove the rgbimg module. It has been deprecated since Python 2.5. ........ r55465 | nick.coghlan | 2007-05-20 04:12:49 -0700 (Sun, 20 May 2007) | 1 line Fix typo in example (should be backported, but my maintenance branch is woefully out of date) ........ ................ r55472 | brett.cannon | 2007-05-20 12:06:18 -0700 (Sun, 20 May 2007) | 2 lines Remove imageop from the Windows build process. ................ r55486 | neal.norwitz | 2007-05-20 23:59:52 -0700 (Sun, 20 May 2007) | 1 line Remove callable() builtin ................ r55506 | neal.norwitz | 2007-05-22 00:43:29 -0700 (Tue, 22 May 2007) | 78 lines Merged revisions 55468-55505 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r55468 | neal.norwitz | 2007-05-20 11:06:27 -0700 (Sun, 20 May 2007) | 1 line rotor is long gone. ........ r55470 | neal.norwitz | 2007-05-20 11:43:00 -0700 (Sun, 20 May 2007) | 1 line Update directories/files at the top-level. ........ r55471 | brett.cannon | 2007-05-20 12:05:06 -0700 (Sun, 20 May 2007) | 2 lines Try to remove rgbimg from Windows builds. ........ r55474 | brett.cannon | 2007-05-20 16:17:38 -0700 (Sun, 20 May 2007) | 4 lines Remove the macfs module. This led to the deprecation of macostools.touched(); it completely relied on macfs and is a no-op on OS X according to code comments. ........ r55476 | brett.cannon | 2007-05-20 16:56:18 -0700 (Sun, 20 May 2007) | 3 lines Move imgfile import to the global namespace to trigger an import error ASAP to prevent creation of a test file. ........ r55477 | brett.cannon | 2007-05-20 16:57:38 -0700 (Sun, 20 May 2007) | 3 lines Cause posixfile to raise a DeprecationWarning. Documented as deprecated since Ptyhon 1.5. ........ r55479 | andrew.kuchling | 2007-05-20 17:03:15 -0700 (Sun, 20 May 2007) | 1 line Note removed modules ........ r55481 | martin.v.loewis | 2007-05-20 21:35:47 -0700 (Sun, 20 May 2007) | 2 lines Add Alexandre Vassalotti. ........ r55482 | george.yoshida | 2007-05-20 21:41:21 -0700 (Sun, 20 May 2007) | 4 lines fix against r55474 [Remove the macfs module] Remove "libmacfs.tex" from Makefile.deps and mac/mac.tex. ........ r55487 | raymond.hettinger | 2007-05-21 01:13:35 -0700 (Mon, 21 May 2007) | 1 line Replace assertion with straight error-checking. ........ r55489 | raymond.hettinger | 2007-05-21 09:40:10 -0700 (Mon, 21 May 2007) | 1 line Allow all alphanumeric and underscores in type and field names. ........ r55490 | facundo.batista | 2007-05-21 10:32:32 -0700 (Mon, 21 May 2007) | 5 lines Added timeout support to HTTPSConnection, through the socket.create_connection function. Also added a small test for this, and updated NEWS file. ........ r55495 | georg.brandl | 2007-05-21 13:34:16 -0700 (Mon, 21 May 2007) | 2 lines Patch #1686487: you can now pass any mapping after '**' in function calls. ........ r55502 | neal.norwitz | 2007-05-21 23:03:36 -0700 (Mon, 21 May 2007) | 1 line Document new params to HTTPSConnection ........ r55504 | neal.norwitz | 2007-05-22 00:16:10 -0700 (Tue, 22 May 2007) | 1 line Stop using METH_OLDARGS ........ r55505 | neal.norwitz | 2007-05-22 00:16:44 -0700 (Tue, 22 May 2007) | 1 line Stop using METH_OLDARGS implicitly ........ ................
* Merged revisions 55270-55324 via svnmerge fromGuido van Rossum2007-05-141-22/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r55271 | fred.drake | 2007-05-11 10:14:47 -0700 (Fri, 11 May 2007) | 3 lines remove jpeg, panel libraries for SGI; there is more IRIX stuff left over, I guess that should be removed too, but will leave for someone who is sure ........ r55280 | fred.drake | 2007-05-11 19:11:37 -0700 (Fri, 11 May 2007) | 1 line remove mention of file that has been removed ........ r55301 | brett.cannon | 2007-05-13 17:38:05 -0700 (Sun, 13 May 2007) | 4 lines Remove rexec and Bastion from the stdlib. This also eliminates the need for f_restricted on frames. This in turn negates the need for PyEval_GetRestricted() and PyFrame_IsRestricted(). ........ r55303 | brett.cannon | 2007-05-13 19:22:22 -0700 (Sun, 13 May 2007) | 2 lines Remove the md5 and sha modules. ........ r55305 | george.yoshida | 2007-05-13 19:45:55 -0700 (Sun, 13 May 2007) | 2 lines fix markup ........ r55306 | neal.norwitz | 2007-05-13 19:47:57 -0700 (Sun, 13 May 2007) | 1 line Get the doc building again after some removals. ........ r55307 | neal.norwitz | 2007-05-13 19:50:45 -0700 (Sun, 13 May 2007) | 1 line Get test_pyclbr passing again after getstatus was removed from commands. This "test case" was weird since it was just importing a seemingly random module. Remove the import ........ r55322 | brett.cannon | 2007-05-14 14:09:20 -0700 (Mon, 14 May 2007) | 3 lines Remove the compiler package. Will eventually need a mechanism to byte compile an AST. ........
* Got test_pickletools and test_pickle working.Guido van Rossum2007-05-081-25/+30
| | | | (Alas, test_cpickle is still broken.)