Martin Panter
7462b64911
Issue #25523 : Correct "a" article to "an" article
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
10 years ago
Victor Stinner
358af13526
Issue #25353 : Optimize unicode escape and raw unicode escape encoders to use
the new _PyBytesWriter API.
10 years ago
Serhiy Storchaka
0d554d7ef1
Issue #24164 : Objects that need calling ``__new__`` with keyword arguments,
can now be pickled using pickle protocols older than protocol version 4.
10 years ago
Serhiy Storchaka
e060619d4b
Issue #25262 . Added support for BINBYTES8 opcode in Python implementation of
unpickler. Highest 32 bits of 64-bit size for BINUNICODE8 and BINBYTES8
opcodes no longer silently ignored on 32-bit platforms in C implementation.
10 years ago
Benjamin Peterson
6aa1564e9c
initialize return value to NULL to avoid compiler compliants ( closes #25245 )
10 years ago
Benjamin Peterson
e48cf7e729
prevent overflow in _Unpickler_Read
10 years ago
Yury Selivanov
f488fb422a
Issue #19235 : Add new RecursionError exception. Patch by Georg Brandl.
11 years ago
Benjamin Peterson
80f78a3efc
fix use after free ( closes #24552 )
11 years ago
Benjamin Peterson
59b08c18a8
use safe allocation and reallocation macros
11 years ago
Larry Hastings
89964c48d1
Issue #23944 : Argument Clinic now wraps long impl prototypes at column 78.
11 years ago
Serhiy Storchaka
bfe1824d08
Issue #18473 : Fixed 2to3 and 3to2 compatible pickle mappings.
Fixed ambigious reverse mappings. Added many new mappings. Import mapping
is no longer applied to modules already mapped with full name mapping.
Added tests for compatible pickling and unpickling and for consistency of
_compat_pickle mappings.
11 years ago
Serhiy Storchaka
1009bf18b3
Issue #23501 : Argumen Clinic now generates code into separate files by default.
11 years ago
Serhiy Storchaka
58e4134a1c
Issue #23611 : Serializing more "lookupable" objects (such as unbound methods
or nested classes) now are supported with pickle protocols < 4.
11 years ago
Serhiy Storchaka
c86ca26d32
Issue #23096 : Pickle representation of floats with protocol 0 now is the same
for both Python and C implementations.
11 years ago
Serhiy Storchaka
707b5ccde5
Issue #22783 : Pickling now uses the NEWOBJ opcode instead of the NEWOBJ_EX
opcode if possible.
11 years ago
Serhiy Storchaka
5bbd231f27
Issue #15513 : Added a __sizeof__ implementation for pickle classes.
11 years ago
Antoine Pitrou
6cd5eda0dd
Fix uninitialized variable after #22676 .
11 years ago
Antoine Pitrou
fce60eaf15
Issue #22676 : Make the pickling of global objects which don't have a __module__ attribute less slow.
11 years ago
Serhiy Storchaka
67c719b34b
Silenced some warnings about comparison between signed and unsigned integer
expressions.
12 years ago
Victor Stinner
049e509a9f
Issue #22207 : Fix "comparison between signed and unsigned integers" warning in
test checking for integer overflow on Py_ssize_t type: cast explicitly to
size_t.
12 years ago
Victor Stinner
7270b7f1aa
_pickle: Optimize raw_unicode_escape(), use directly a bytes object, don't use
a temporary bytearray object.
12 years ago
Victor Stinner
f13c46cc69
Issue #22218 : Fix "comparison between signed and unsigned integers" warnings in
Modules/_pickle.c.
12 years ago
Larry Hastings
581ee3618c
Issue #20326 : Argument Clinic now uses a simple, unique signature to
annotate text signatures in docstrings, resulting in fewer false
positives. "self" parameters are also explicitly marked, allowing
inspect.Signature() to authoritatively detect (and skip) said parameters.
Issue #20326 : Argument Clinic now generates separate checksums for the
input and output sections of the block, allowing external tools to verify
that the input has not changed (and thus the output is not out-of-date).
12 years ago
Serhiy Storchaka
3c1f0f1b42
Issue #20395 : Extract generated clinic code in Modules/_pickle.c to separate file.
12 years ago
Christian Heimes
27ea78b352
silence compiler warning that 's' may be used uninitialized in the load function.
12 years ago
Larry Hastings
c20472640c
Issue #20390 : Small fixes and improvements for Argument Clinic.
12 years ago
Larry Hastings
5c66189e88
Issue #20189 : Four additional builtin types (PyTypeObject,
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
12 years ago
Larry Hastings
462582651c
Two minor Argument Clinic bugfixes: use the name of the class in the
docstring for __new__ and __init__, and always use "goto exit" instead of
returning "NULL" for failure to parse (as _new__ and __init__ return ints).
12 years ago
Larry Hastings
b7ccb20423
Issue #20294 : Argument Clinic now supports argument parsing for __new__ and
__init__ functions.
12 years ago
Larry Hastings
bebf73511a
Issue #20287 : Argument Clinic's output is now configurable, allowing
delaying its output or even redirecting it to a separate file.
12 years ago
Larry Hastings
8666e65206
Issue #20228 : Argument Clinic now has special support for class special
methods.
12 years ago
Larry Hastings
61272b77b0
Issue #19273 : The marker comments Argument Clinic uses have been changed
to improve readability.
12 years ago
Larry Hastings
3cceb38486
Issue #19976 : Argument Clinic METH_NOARGS functions now always
take two parameters.
12 years ago
Stefan Krah
f483b0f3a9
Issue #19972 : Add rarely used freefunc. This fixes a leak if sys.exit()
is used in a program.
12 years ago
Alexandre Vassalotti
d05c9ff845
Issue #6784 : Strings from Python 2 can now be unpickled as bytes objects.
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.
12 years ago
Alexandre Vassalotti
6e73ff1a31
Issue #19881 : Fix bad pickling of large bytes in cpickle.
12 years ago
Alexandre Vassalotti
65846c6c51
Issue #6477 : Keep PyNotImplemented_Type and PyNone_Type private.
12 years ago
Alexandre Vassalotti
19b6fa6ebb
Issue #6477 : Added support for pickling the types of built-in singletons.
12 years ago
Alexandre Vassalotti
896414fedf
Fixed _pickle.Unpickler to handle empty persistent IDs correctly.
12 years ago
Serhiy Storchaka
6fe39b76a9
Issue #17897 : Optimized unpickle prefetching.
12 years ago
Alexandre Vassalotti
567eba1852
Use PyDict_GetItemWithError instead of PyDict_GetItem in cpickle.
12 years ago
Alexandre Vassalotti
6bf41e54a4
Remove explicit empty tuple reuse in cpickle.
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.
12 years ago
Alexandre Vassalotti
b13e6bcbd8
Remove the tuple reuse optimization in _Pickle_FastCall.
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.
12 years ago
Alexandre Vassalotti
23bdd83053
Encapsulate cpickle global state in a dedicated object.
This implements PEP 3121 module finalization as well. This change does not
cause any significant impact on performance.
12 years ago
Alexandre Vassalotti
20c28c1ea2
Combine the FastCall functions in cpickle.
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.
12 years ago
Alexandre Vassalotti
b4a04fb7e6
Reverting e39db21df580 eagerly due to buildbot failures.
12 years ago
Alexandre Vassalotti
f94a041f8f
Combine _Pickler_FastCall and _Unpickler_FastCall in cpickle.
12 years ago
Alexandre Vassalotti
1048fb5539
Issue #19739 : Try to fix compiler warnings on 32-bit Windows.
12 years ago
Alexandre Vassalotti
ded929b300
Merge save_int into save_long in cpickle to remove redundant code.
Also, replace unnessary uses of the #if preprocessor directive.
12 years ago
Alexandre Vassalotti
8a67f52463
Simplify save_bool in cpickle.
12 years ago