Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue #19972: Add rarely used freefunc. This fixes a leak if sys.exit() | Stefan Krah | 2013-12-14 | 1 | -8/+14 |
| | | | | is used in a program. | ||||
* | Issue #6784: Strings from Python 2 can now be unpickled as bytes objects. | Alexandre Vassalotti | 2013-12-07 | 1 | -189/+217 |
| | | | | | | | 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 #19881: Fix bad pickling of large bytes in cpickle. | Alexandre Vassalotti | 2013-12-06 | 1 | -1/+1 |
| | |||||
* | Issue #6477: Merge with 3.3. | Alexandre Vassalotti | 2013-12-01 | 1 | -2/+2 |
|\ | |||||
| * | Issue #6477: Keep PyNotImplemented_Type and PyNone_Type private. | Alexandre Vassalotti | 2013-12-01 | 1 | -2/+2 |
| | | |||||
* | | Issue #6477: Merge with 3.3. | Alexandre Vassalotti | 2013-12-01 | 1 | -1/+31 |
|\ \ | |/ | |||||
| * | Issue #6477: Added support for pickling the types of built-in singletons. | Alexandre Vassalotti | 2013-12-01 | 1 | -1/+31 |
| | | |||||
* | | Merge with 3.3. | Alexandre Vassalotti | 2013-11-30 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Fixed _pickle.Unpickler to handle empty persistent IDs correctly. | Alexandre Vassalotti | 2013-11-30 | 1 | -1/+1 |
| | | |||||
* | | Issue #17897: Optimized unpickle prefetching. | Serhiy Storchaka | 2013-11-30 | 1 | -30/+22 |
| | | |||||
* | | Use PyDict_GetItemWithError instead of PyDict_GetItem in cpickle. | Alexandre Vassalotti | 2013-11-29 | 1 | -12/+35 |
| | | |||||
* | | Remove explicit empty tuple reuse in cpickle. | Alexandre Vassalotti | 2013-11-28 | 1 | -12/+6 |
| | | | | | | | | | | | | PyTuple_New(0) always returns the same empty tuple from its free list anyway, so we are not saving much here. Plus, the code where this was used is on uncommon run paths. | ||||
* | | Remove the tuple reuse optimization in _Pickle_FastCall. | Alexandre Vassalotti | 2013-11-28 | 1 | -30/+15 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have noticed a race-condition occurring on one of the buildbots because of this optimization. The function called may release the GIL which means multiple threads may end up accessing the shared tuple. I could fix it up by storing the tuple to the Pickler and Unipickler object again, but honestly it really not worth the trouble. I ran many benchmarks and the only time the optimization helps is when using a fin-memory file, like io.BytesIO on which reads are super cheap, combined with pickle protocol less than 4. Even in this contrived case, the speedup is a about 5%. For everything else, this optimization does not provide any noticable improvements. | ||||
* | | Encapsulate cpickle global state in a dedicated object. | Alexandre Vassalotti | 2013-11-28 | 1 | -270/+426 |
| | | | | | | | | | | This implements PEP 3121 module finalization as well. This change does not cause any significant impact on performance. | ||||
* | | Combine the FastCall functions in cpickle. | Alexandre Vassalotti | 2013-11-27 | 1 | -90/+42 |
| | | | | | | | | | | I fixed the bug that was in my previous attempt of this cleanup. I ran the full test suite to verify I didn't introduce any obvious bugs. | ||||
* | | Reverting e39db21df580 eagerly due to buildbot failures. | Alexandre Vassalotti | 2013-11-25 | 1 | -33/+90 |
| | | |||||
* | | Combine _Pickler_FastCall and _Unpickler_FastCall in cpickle. | Alexandre Vassalotti | 2013-11-25 | 1 | -90/+33 |
| | | |||||
* | | Issue #19739: Try to fix compiler warnings on 32-bit Windows. | Alexandre Vassalotti | 2013-11-25 | 1 | -22/+21 |
| | | |||||
* | | Merge save_int into save_long in cpickle to remove redundant code. | Alexandre Vassalotti | 2013-11-25 | 1 | -53/+33 |
| | | | | | | | | Also, replace unnessary uses of the #if preprocessor directive. | ||||
* | | Simplify save_bool in cpickle. | Alexandre Vassalotti | 2013-11-25 | 1 | -18/+11 |
| | | |||||
* | | Use Clinic to process arguments in cpickle. | Alexandre Vassalotti | 2013-11-24 | 1 | -257/+672 |
| | | | | | | | | | | | | This doesn't make any functional changes to the exisiting implementation. The conversion did help however uncover documentation bugs. The best thing about this conversion is less C code to maintain by hand. | ||||
* | | Remove code path in cpickle that does not exist in pickle. | Alexandre Vassalotti | 2013-11-24 | 1 | -7/+1 |
| | | |||||
* | | Make Ellipsis and NotImplemented picklable through the reduce protocol. | Alexandre Vassalotti | 2013-11-24 | 1 | -32/+0 |
| | | |||||
* | | Make built-in methods picklable through the reduce protocol. | Alexandre Vassalotti | 2013-11-24 | 1 | -32/+0 |
| | | |||||
* | | Make framing optional in pickle protocol 4. | Alexandre Vassalotti | 2013-11-24 | 1 | -126/+34 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow us to control in the future whether to use framing or not. For example, we may want to turn it off for tiny pickle where it doesn't help. The change also improves performance slightly: ### fastpickle ### Min: 0.608517 -> 0.557358: 1.09x faster Avg: 0.798892 -> 0.694738: 1.15x faster Significant (t=3.45) Stddev: 0.17145 -> 0.12704: 1.3496x smaller Timeline: http://goo.gl/3xQE1J ### pickle_dict ### Min: 0.669920 -> 0.615271: 1.09x faster Avg: 0.733633 -> 0.645058: 1.14x faster Significant (t=5.05) Stddev: 0.12041 -> 0.02961: 4.0662x smaller Timeline: http://goo.gl/LpLSXI ### pickle_list ### Min: 0.397583 -> 0.368112: 1.08x faster Avg: 0.412784 -> 0.397223: 1.04x faster Significant (t=2.78) Stddev: 0.01518 -> 0.03653: 2.4068x larger Timeline: http://goo.gl/v39E59 ### unpickle_list ### Min: 0.692935 -> 0.594870: 1.16x faster Avg: 0.730012 -> 0.628395: 1.16x faster Significant (t=17.76) Stddev: 0.02720 -> 0.02995: 1.1012x larger Timeline: http://goo.gl/2P9AEt The following not significant results are hidden, use -v to show them: fastunpickle. | ||||
* | | Fix signed / unsigned comparison | Antoine Pitrou | 2013-11-23 | 1 | -1/+1 |
| | | |||||
* | | gcc doesn't realize that dummy is always initialized by the function call | Gregory P. Smith | 2013-11-23 | 1 | -1/+1 |
| | | | | | | | | | | and warns about potential uninitialized use. Silence that by initializing it to null. | ||||
* | | Issue #17810: Add two missing error checks to save_global | Christian Heimes | 2013-11-23 | 1 | -2/+4 |
| | | | | | | | | CID 1131946: Unchecked return value (CHECKED_RETURN) | ||||
* | | Merge | Antoine Pitrou | 2013-11-23 | 1 | -1/+1 |
|\ \ | |||||
| * | | Issue #17810: return -1 on error | Christian Heimes | 2013-11-23 | 1 | -1/+1 |
| | | | |||||
* | | | Fix writing out 64-bit size fields on 32-bit builds | Antoine Pitrou | 2013-11-23 | 1 | -11/+21 |
|/ / | |||||
* | | Issue #17810: Add NULL check to save_frozenset | Christian Heimes | 2013-11-23 | 1 | -0/+3 |
| | | | | | | | | CID 1131949: Dereference null return value (NULL_RETURNS) | ||||
* | | Issue #17810: Implement PEP 3154, pickle protocol 4. | Antoine Pitrou | 2013-11-23 | 1 | -367/+1013 |
| | | | | | | | | Most of the work is by Alexandre. | ||||
* | | Issue #19437: Use an identifier for "__name__" string in pickle to improve | Victor Stinner | 2013-11-14 | 1 | -12/+5 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | error handling The following code didn't handle correctly the failure of PyUnicode_InternFromString("__name__"). if (newobj_str == NULL) { newobj_str = PyUnicode_InternFromString("__newobj__"); name_str = PyUnicode_InternFromString("__name__"); if (newobj_str == NULL || name_str == NULL) return -1; } | ||||
* | | Issue #19512: pickle now uses an identifier to only create the Unicode string | Victor Stinner | 2013-11-06 | 1 | -2/+4 |
| | | | | | | | | "modules" once | ||||
* | | Issue #19437: Fix _pickle, don't call _Unpickler_SkipConsumed() with an | Victor Stinner | 2013-10-31 | 1 | -3/+3 |
| | | | | | | | | exception set | ||||
* | | cleanup _Unpickler_SkipConsumed(): remove 1 level of indentation | Victor Stinner | 2013-10-31 | 1 | -12/+15 |
| | | |||||
* | | Issue #18783: Removed existing mentions of Python long type in docstrings, | Serhiy Storchaka | 2013-08-27 | 1 | -7/+7 |
|\ \ | |/ | | | | | error messages and comments. | ||||
| * | Issue #18783: Removed existing mentions of Python long type in docstrings, | Serhiy Storchaka | 2013-08-27 | 1 | -7/+7 |
| | | | | | | | | error messages and comments. | ||||
* | | Issue #18559: Fix NULL pointer dereference error in _pickle module | Christian Heimes | 2013-07-26 | 1 | -4/+6 |
|\ \ | |/ | |||||
| * | Issue #18559: Fix NULL pointer dereference error in _pickle module | Christian Heimes | 2013-07-26 | 1 | -4/+6 |
| | | |||||
* | | Issue #18408: handle PySys_GetObject() failure, raise a RuntimeError | Victor Stinner | 2013-07-16 | 1 | -2/+6 |
| | | |||||
* | | Issue #18408: _pickle.c: Add missing PyErr_NoMemory() on memory allocation ↵ | Victor Stinner | 2013-07-11 | 1 | -2/+7 |
| | | | | | | | | failures | ||||
* | | Issue #18408: _PyMemoTable_ResizeTable() now restores the old table if | Victor Stinner | 2013-07-11 | 1 | -1/+1 |
| | | | | | | | | | | | | allocating a bigger table failed PyMemoTable destructor does crash if mt_table is NULL. | ||||
* | | Issue #18408: Oh, I was wrong: Pickler_New() must call Py_DECREF() to destroy | Victor Stinner | 2013-07-11 | 1 | -1/+1 |
| | | | | | | | | the newly created pickler, and not PyObject_GC_Del(). | ||||
* | | Issue #18408: Fix _Pickler_New() and _Unpickler_New(): initialize all | Victor Stinner | 2013-07-11 | 1 | -22/+14 |
| | | | | | | | | | | | | | | | | | | attributes before handling errors _Pickler_New() now calls PyObject_GC_Del() instead of Py_DECREF() on error, because the pickle object is created using PyObject_GC_New(). Fix a crash in the destructor when an attribute is not initiallized. | ||||
* | | Issue #18203: Add _PyMem_RawStrdup() and _PyMem_Strdup() | Victor Stinner | 2013-07-07 | 1 | -6/+6 |
| | | | | | | | | | | Replace strdup() with _PyMem_RawStrdup() or _PyMem_Strdup(), depending if the GIL is held or not. | ||||
* | | Singular form just like the other error message. | Christian Heimes | 2013-07-01 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Singular form just like the other error message. | Christian Heimes | 2013-07-01 | 1 | -1/+1 |
| | | |||||
* | | Issue #18339: Negative ints keys in unpickler.memo dict no longer cause a | Christian Heimes | 2013-07-01 | 1 | -0/+5 |
|\ \ | |/ | | | | | segfault inside the _pickle C extension. |