summaryrefslogtreecommitdiffstats
path: root/Modules/_pickle.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #8383: pickle and pickletools use surrogatepass error handler whenVictor Stinner2010-04-131-2/+4
| | | | | encoding unicode as utf8 to support lone surrogates and stay compatible with Python 2.x and 3.0
* Merged revisions 77352-77354 via svnmerge fromAntoine Pitrou2010-01-071-1/+1
| | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77352 | antoine.pitrou | 2010-01-07 18:46:49 +0100 (jeu., 07 janv. 2010) | 5 lines Issue #7455: Fix possible crash in cPickle on invalid input. Patch by Florent Xicluna. ........ r77353 | antoine.pitrou | 2010-01-07 18:49:37 +0100 (jeu., 07 janv. 2010) | 3 lines Fix attribution. Florent actually repackaged and reviewed Victor's patch (sorry!). ........ r77354 | antoine.pitrou | 2010-01-07 18:54:10 +0100 (jeu., 07 janv. 2010) | 3 lines Fix reattribution mistake when fixing attribution mistake! ........
* Issue #6137: The pickle module now translates module names when loadingAntoine Pitrou2009-06-041-41/+240
| | | | | | 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.
* Merged revisions 72930 via svnmerge fromCollin Winter2009-05-261-9/+8
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72930 | collin.winter | 2009-05-25 21:12:39 -0700 (Mon, 25 May 2009) | 1 line Issue 5794: fix cPickle's unpickling of recursive tuples. ........
* Make variable declarations for opcodes in batch_dict_exact consistentAlexandre Vassalotti2009-05-251-5/+5
| | | | with the rest of the module.
* Merged revisions 72909 via svnmerge fromCollin Winter2009-05-251-9/+81
| | | | | | | | | | | | http://svn.python.org/projects/python/trunk Note that the performance improvement for the py3k branch is not as high as for trunk. ........ r72909 | collin.winter | 2009-05-24 21:34:39 -0700 (Sun, 24 May 2009) | 2 lines Issue 5670: special-case pickling of dicts. This nearly doubles the performance of dict pickling in cPickle. ........
* Issue #5914: Add new C-API function PyOS_string_to_double, to complementMark Dickinson2009-05-031-7/+7
| | | | PyOS_double_to_string, and deprecate PyOS_ascii_strtod and PyOS_ascii_atof.
* Merged revisions 72223 via svnmerge fromAntoine Pitrou2009-05-021-1/+15
| | | | | | | | | | | | 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. ........
* Make sure that marshal and pickle continue to output 17Mark Dickinson2009-04-171-1/+1
| | | | digits of precision for floats.
* The other half of Issue #1580: use short float repr where possible.Eric Smith2009-04-161-8/+23
| | | | | | | | | | | | | | Addresses the float -> string conversion, using David Gay's code which was added in Mark Dickinson's checkin r71663. Also addresses these, which are intertwined with the short repr changes: - Issue #5772: format(1e100, '<') produces '1e+100', not '1.0e+100' - Issue #5515: 'n' formatting with commas no longer works poorly with leading zeros. - PEP 378 Format Specifier for Thousands Separator: implemented for floats.
* Update a comment about why the __module__ can sometime be NULL.Alexandre Vassalotti2009-04-031-3/+6
| | | | Initialize last_string and arg member of Unpickler.
* Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson2009-02-021-2/+2
| | | | | type of tp_compare in a separate commit, for ease of reversion should things go wrong.
* Issue #1717, stage 2: remove uses of tp_compare in Modules and mostMark Dickinson2009-02-011-1/+1
| | | | Objects.
* Merged revisions 68903,68906 via svnmerge fromMark Dickinson2009-01-241-1/+2
| | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68903 | mark.dickinson | 2009-01-24 16:40:29 +0000 (Sat, 24 Jan 2009) | 5 lines Issue #1672332: Fix unpickling of subnormal floats, which was raising ValueError on some platforms as a result of the platform strtod setting errno on underflow. ........ r68906 | mark.dickinson | 2009-01-24 21:08:38 +0000 (Sat, 24 Jan 2009) | 2 lines Issue #3657: fix occasional test_pickletools failures. ........
* Factor common branch in load_long().Alexandre Vassalotti2009-01-241-5/+2
| | | | Suggested by Neal Norwitz.
* Remove unnecessary copying in load_long().Alexandre Vassalotti2009-01-231-11/+3
|
* Issue #4842, patch 1/2: fix pickle in Python 3.x so that pickling with theMark Dickinson2009-01-201-8/+28
| | | | | | '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.
* Update copy of PyUnicode_EncodeRawUnicodeEscape in _pickle.Alexandre Vassalotti2008-12-271-5/+36
| | | | Add astral character test case.
* #4373: Reference leak in the pickle module.Amaury Forgeot d'Arc2008-11-251-0/+2
| | | | Reviewed by Brett Cannon.
* #4298: pickle.load() can segfault on invalid or truncated input.Amaury Forgeot d'Arc2008-11-111-0/+5
| | | | Patch and test by Hirokazu Yamamoto.
* Sorry, r67092 is commit miss....Hirokazu Yamamoto2008-11-041-8/+8
|
* Blocked revisions 67002 via svnmergeHirokazu Yamamoto2008-11-041-8/+8
| | | | | | | | ........ r67002 | hirokazu.yamamoto | 2008-10-23 09:37:33 +0900 | 1 line Issue #4183: Some tests didn't run with pickle.HIGHEST_PROTOCOL. ........
* Merged revisions 67049 via svnmerge fromAmaury Forgeot d'Arc2008-10-301-16/+28
| | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r67049 | amaury.forgeotdarc | 2008-10-30 22:18:34 +0100 (jeu., 30 oct. 2008) | 8 lines Issue #4176: Pickle would crash the interpreter when a __reduce__ function does not return an iterator for the 4th and 5th items. (sequence-like and mapping-like state) A list is not an iterator... Will backport to 2.6 and 2.5. ........
* #3664: The pickle module could segfault if a Pickler instance is not ↵Amaury Forgeot d'Arc2008-10-171-0/+15
| | | | | | | | | correctly initialized: when a subclass forgets to call the base __init__ method, or when __init__ is called a second time with invalid parameters Patch by Alexandre Vassalotti.
* #3640: Correct a crash in cPickle on 64bit platforms, in the case of deeply ↵Amaury Forgeot d'Arc2008-09-111-62/+118
| | | | | | nested lists or dicts. Reviewed by Martin von Loewis.
* Issue #3660 (part of): fix a memory leak in _pickle.Antoine Pitrou2008-09-051-1/+5
| | | | Patch by Amaury Forgeot d'Arc, review by me.
* Issue #3657: Fix uninitialized memory read when pickling longs.Neal Norwitz2008-08-241-2/+2
| | | | | | | | | | | The conversion to the unicode API was incorrect, it should use bytes. repr is a bad variable name. The use is overloaded, but I'll leave that to fix later. R=Brett TESTED=./python -E -tt ./Lib/test/regrtest.py -uall valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \ ./python -E -tt ./Lib/test/regrtest.py test_pickletools
* Issue 3514: Fixed segfault dues to infinite loop in __getattr__.Alexandre Vassalotti2008-08-151-2/+5
|
* Rename PyUnicode_AsString -> _PyUnicode_AsString andMarc-André Lemburg2008-08-071-3/+3
| | | | | | | | | PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark them for interpreter internal use only. We'll have to rework these APIs or create new ones for the purpose of accessing the UTF-8 representation of Unicode objects for 3.1.
* Fixed _pickle to use Py_EnterRecursiveCall().Alexandre Vassalotti2008-07-131-11/+3
|
* Fixed compiler warnings on MSVC9.0Alexandre Vassalotti2008-06-131-2/+3
|
* Restore _pickle module accelerator module.Alexandre Vassalotti2008-06-121-0/+4546
| | | | | 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-4546/+0
|
* Issue 2917: Merge the pickle and cPickle module.Alexandre Vassalotti2008-06-111-0/+4546