summaryrefslogtreecommitdiffstats
path: root/Lib/pickletools.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge 3.2Alexandre Vassalotti2011-12-131-39/+31
|\
| * Issue #13505: Make pickling of bytes object compatible with Python 2.Alexandre Vassalotti2011-12-131-39/+31
| | | | | | | | Initial patch by sbt.
* | Issue #13575: there is only one class type.Florent Xicluna2011-12-121-0/+2
| |
* | Cleanup code: remove int/long idioms and simplify a while statement.Florent Xicluna2011-10-231-4/+1
|/
* #11565: Merge with 3.1.Ezio Melotti2011-03-161-1/+1
|\
| * #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-1/+1
| |
| * Merged revisions ↵Florent Xicluna2010-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 83212,83829,83833,83838-83839,83878,84019,84025,84028,84032,84036 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83212 | florent.xicluna | 2010-07-28 18:39:41 +0200 (mer., 28 juil. 2010) | 2 lines Syntax cleanup. ........ r83829 | florent.xicluna | 2010-08-08 18:16:07 +0200 (dim., 08 août 2010) | 2 lines Use unittest specific methods for some urllib test cases. And replace urllib2 with urllib.request in comments. ........ r83833 | florent.xicluna | 2010-08-08 18:25:27 +0200 (dim., 08 août 2010) | 2 lines Add test case for the HTTPResponse being an iterable. Follow-up of issue #4608. ........ r83838 | florent.xicluna | 2010-08-08 20:03:44 +0200 (dim., 08 août 2010) | 2 lines Typo. ........ r83839 | florent.xicluna | 2010-08-08 20:06:13 +0200 (dim., 08 août 2010) | 2 lines Issue #7564: Skip test_ioctl if another process is attached to /dev/tty. ........ r83878 | florent.xicluna | 2010-08-09 10:29:08 +0200 (lun., 09 août 2010) | 1 line Merge the 2to3 script from /sandbox/trunk/2to3/2to3, revision 72867 (latest). ........ r84019 | florent.xicluna | 2010-08-14 17:56:42 +0200 (sam., 14 août 2010) | 11 lines Merged manually from 2.7 branch to 3.x trunk. ------------------------------------------------------------------------ r79925 | nick.coghlan | 2010-04-10 16:24:36 +0200 (sam. 10 avril 2010) Try to turn some buildbots green by allowing test_multiprocessing to pass even if it hits the sys.exc_clear code in the threading module, and improve the test coverage by making the ctypes dependencies a bit more granular (two of the cited ctypes objects don't exist on my system) ------------------------------------------------------------------------ ........ r84025 | florent.xicluna | 2010-08-14 18:56:27 +0200 (sam., 14 août 2010) | 1 line List Misc/python-config.in in Misc/README. Fix few typos. ........ r84028 | florent.xicluna | 2010-08-14 19:02:49 +0200 (sam., 14 août 2010) | 1 line Fix order. ........ r84032 | florent.xicluna | 2010-08-14 19:15:31 +0200 (sam., 14 août 2010) | 1 line Convert to spaces. ........ r84036 | florent.xicluna | 2010-08-14 20:03:19 +0200 (sam., 14 août 2010) | 1 line Remove bad merge (from svnmerge r82301) ........
| * Merged revisions 82915 via svnmerge fromAlexander Belopolsky2010-07-161-8/+11
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82915 | alexander.belopolsky | 2010-07-16 10:39:45 -0400 (Fri, 16 Jul 2010) | 1 line Corrected TUPLE<N> opcodes' docs. ........
| * Merged revisions 80031 via svnmerge fromVictor Stinner2010-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r80031 | victor.stinner | 2010-04-13 13:07:24 +0200 (mar., 13 avril 2010) | 4 lines Issue #8383: pickle and pickletools use surrogatepass error handler when encoding unicode as utf8 to support lone surrogates and stay compatible with Python 2.x and 3.0 ........
* | Syntax cleanup.Florent Xicluna2010-07-281-1/+1
| |
* | Issue #9268: Add annotation option to pickletools.disAlexander Belopolsky2010-07-171-5/+39
| |
* | Corrected TUPLE<N> opcodes' docs.Alexander Belopolsky2010-07-161-8/+11
| |
* | Issue #9094: Make python -m pickletools disassemble pickles given inAlexander Belopolsky2010-07-031-1/+40
| | | | | | | | the command line.
* | Issue #8383: pickle and pickletools use surrogatepass error handler whenVictor Stinner2010-04-131-1/+1
|/ | | | | encoding unicode as utf8 to support lone surrogates and stay compatible with Python 2.x and 3.0
* Issue #6137: The pickle module now translates module names when loadingAntoine Pitrou2009-06-041-85/+85
| | | | | | 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.
* Merge r72792: POP_MARK was not in pickle protocol 0, SHORT_BINBYTES was not ↵Collin Winter2009-05-201-2/+2
| | | | in protocol 1.
* Merged revisions 68903,68906 via svnmerge fromMark Dickinson2009-01-241-5/+5
| | | | | | | | | | | | | | | | 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. ........
* Issue #4842, patch 1/2: fix pickle in Python 3.x so that pickling with theMark Dickinson2009-01-201-38/+40
| | | | | | '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.
* Restore _pickle module accelerator module.Alexandre Vassalotti2008-06-121-10/+12
| | | | | 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-12/+10
|
* Issue 2917: Merge the pickle and cPickle module.Alexandre Vassalotti2008-06-111-10/+12
|
* Rename copy_reg module to copyreg.Alexandre Vassalotti2008-05-111-48/+48
| | | | | | | | | | | | | | | 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. ........
* - A new pickle protocol (protocol 3) is added with explicit supportGuido van Rossum2008-03-171-23/+86
| | | | | | | | | | | | | 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 ↵Christian Heimes2008-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,60505-60506,60508-60509,60523-60524,60532,60543,60545,60547-60548,60552,60554,60556-60559,60561-60562,60569,60571-60572,60574,60576-60583,60585-60586,60589,60591,60594-60595,60597-60598,60600-60601,60606-60612,60615,60617,60619-60621,60623-60625,60627-60629,60631,60633,60635,60647,60650,60652,60654,60656,60658-60659,60664-60666,60668-60670,60672,60676,60678,60680-60683,60685-60686,60688,60690,60692-60694,60697-60700,60705-60706,60708,60711,60714,60720,60724-60734 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r60731 | raymond.hettinger | 2008-02-11 19:51:08 +0100 (Mon, 11 Feb 2008) | 1 line No need to register classes that already inherit from ABCs. ........ r60733 | lars.gustaebel | 2008-02-11 20:17:10 +0100 (Mon, 11 Feb 2008) | 2 lines Make sure that xstar headers are read correctly. ........ r60734 | raymond.hettinger | 2008-02-11 21:05:53 +0100 (Mon, 11 Feb 2008) | 1 line Add tests for pickletools.optimize(). ........
* Merged revisions ↵Christian Heimes2008-02-111-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,60505-60506,60508-60509,60523-60524,60532,60543,60545,60547-60548,60552,60554,60556-60559,60561-60562,60569,60571-60572,60574,60576-60583,60585-60586,60589,60591,60594-60595,60597-60598,60600-60601,60606-60612,60615,60617,60619-60621,60623-60625,60627-60629,60631,60633,60635,60647,60650,60652,60654,60656,60658-60659,60664-60666,60668-60670,60672,60676,60678,60680-60683,60685-60686,60688,60690,60692-60694,60697-60706,60708-60712,60714-60724 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r60701 | georg.brandl | 2008-02-09 22:36:15 +0100 (Sat, 09 Feb 2008) | 2 lines Needs only 2.4 now. ........ r60702 | georg.brandl | 2008-02-09 22:38:54 +0100 (Sat, 09 Feb 2008) | 2 lines Docs are rst now. ........ r60703 | georg.brandl | 2008-02-09 23:00:00 +0100 (Sat, 09 Feb 2008) | 2 lines Fix link. ........ r60704 | georg.brandl | 2008-02-10 00:09:25 +0100 (Sun, 10 Feb 2008) | 2 lines Fix for newest doctools. ........ r60709 | raymond.hettinger | 2008-02-10 08:21:09 +0100 (Sun, 10 Feb 2008) | 1 line Clarify that decimal also supports fixed-point arithmetic. ........ r60710 | nick.coghlan | 2008-02-10 08:32:52 +0100 (Sun, 10 Feb 2008) | 1 line Add missing NEWS entry for r60695 ........ r60712 | mark.dickinson | 2008-02-10 15:58:38 +0100 (Sun, 10 Feb 2008) | 3 lines Turn classmethods into staticmethods, and avoid calling the constructor of subclasses of Rational. (See discussion in issue #1682.) ........ r60715 | mark.dickinson | 2008-02-10 16:19:58 +0100 (Sun, 10 Feb 2008) | 2 lines Typos in decimal comment and documentation ........ r60716 | skip.montanaro | 2008-02-10 16:31:54 +0100 (Sun, 10 Feb 2008) | 2 lines Get the saying right. ;-) ........ r60717 | skip.montanaro | 2008-02-10 16:32:16 +0100 (Sun, 10 Feb 2008) | 2 lines whoops - revert ........ r60718 | mark.dickinson | 2008-02-10 20:23:36 +0100 (Sun, 10 Feb 2008) | 2 lines Remove reference to Rational ........ r60719 | raymond.hettinger | 2008-02-10 21:35:16 +0100 (Sun, 10 Feb 2008) | 1 line Complete an open todo on pickletools -- add a pickle optimizer. ........ r60721 | mark.dickinson | 2008-02-10 22:29:51 +0100 (Sun, 10 Feb 2008) | 3 lines Rename rational.Rational to fractions.Fraction, to avoid name clash with numbers.Rational. See issue #1682 for related discussion. ........ r60722 | christian.heimes | 2008-02-11 03:26:22 +0100 (Mon, 11 Feb 2008) | 1 line The test requires the network resource ........ r60723 | mark.dickinson | 2008-02-11 04:11:55 +0100 (Mon, 11 Feb 2008) | 3 lines Put an extra space into the repr of a Fraction: Fraction(1, 2) instead of Fraction(1,2). ........
* #1535: rename __builtin__ module to builtins.Georg Brandl2007-12-021-36/+36
|
* Merging the py3k-pep3137 branch back into the py3k branch.Guido van Rossum2007-11-061-10/+13
| | | | | | | | | | | | | | 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 #1303: Adapt str8 constructor to bytes (now buffer) one.Georg Brandl2007-10-241-1/+1
|
* Patch# 1258 by Christian Heimes: kill basestring.Guido van Rossum2007-10-161-5/+5
| | | | I like this because it makes the code shorter! :-)
* Change string literals to bytes, since they are compared to bytes.Jeremy Hylton2007-08-291-2/+2
|
* More str/bytes fixes.Guido van Rossum2007-08-271-4/+4
|
* SF patch# 1770008 by Christian Heimes (plus some extras).Guido van Rossum2007-08-091-2/+2
| | | | | | | | | | Completely get rid of StringIO.py and cStringIO.c. I had to fix a few tests and modules beyond what Christian did, and invent a few conventions. E.g. in elementtree, I chose to write/return Unicode strings whe no encoding is given, but bytes when an explicit encoding is given. Also mimetools was made to always assume binary files.
* Getting rid of cPickle. Mmm, feels good!Guido van Rossum2007-07-201-6/+4
|
* Make test_pickletools.py pass.Guido van Rossum2007-07-171-34/+20
|
* Rip out all codecs that can't work in a unicode/bytes world:Walter Dörwald2007-06-121-3/+3
| | | | | | | | 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-4/+1
| | | | | | | | | | | | | | | | | | | 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 55270-55324 via svnmerge fromGuido van Rossum2007-05-141-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-80/+94
| | | | (Alas, test_cpickle is still broken.)
* Checkpoint. A b it closer to working pickles and pickletools.Guido van Rossum2007-05-071-1/+2
| | | | Added 'Y' getargs opcode which requires a bytes object.
* Rip out all the u"..." literals and calls to unicode().Guido van Rossum2007-05-021-3/+3
|
* Change a test to be more predictable.Guido van Rossum2007-02-261-4/+4
| | | | | The problem with using random.random is that several modules and tests do "from random in random" which confuses pickle.whichmodule().
* Fix most trivially-findable print statements.Guido van Rossum2007-02-091-8/+8
| | | | | | | | | There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
* Rip out 'long' and 'L'-suffixed integer literals.Guido van Rossum2007-01-151-5/+5
| | | | (Rough first cut.)
* Fix pickletools doctests -- all we get nowadays is longs.Guido van Rossum2007-01-151-5/+5
| | | | (Hmm... Shouldn't longs of certain sizes be pickled using 'I' opcodes? Later.)
* Get rid of dict.has_key(). Boy this has a lot of repercussions!Guido van Rossum2006-08-181-21/+12
| | | | | | Not all code has been fixed yet; this is just a checkpoint... The C API still has PyDict_HasKey() and _HasKeyString(); not sure if I want to change those just yet.
* SF patch 1495675: Remove types.InstanceType and new.instanceGuido van Rossum2006-05-261-30/+46
| | | | (Collin Winter)
* An instance of class PicklingError was used here simply as an example ofTim Peters2005-02-151-21/+26
| | | | | | | _some_ user-defined class instance. That it was also an exception isn't interesting, but does interfere with Michael Hudson's new-style exception patch. This just changes the doctest example, to use an instance of a non-exception class.
* Remove reference to old pickle feature.Raymond Hettinger2004-12-071-5/+0
|
* Essentially SF patch 1061679: add missing __all__ to pickletools.py.Tim Peters2004-11-061-0/+4
| | | | Harmless.
* Add argument to docstringAndrew M. Kuchling2004-08-071-1/+1
|