summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Use PyDict_GetItemWithError instead of PyDict_GetItem in cpickle.Alexandre Vassalotti2013-11-291-12/+35
|
* Remove explicit empty tuple reuse in cpickle.Alexandre Vassalotti2013-11-281-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 Vassalotti2013-11-281-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.
* Issue #19815: Fix segfault when parsing empty namespace declaration.Eli Bendersky2013-11-281-1/+4
|\ | | | | | | Based on patches by Christian Heimes and Vajrasky Kok
| * Fix indentation from previous commitEli Bendersky2013-11-281-2/+2
| |
| * Issue #19815: Fix segfault when parsing empty namespace declaration.Eli Bendersky2013-11-281-1/+4
| | | | | | | | Based on patches by Christian Heimes and Vajrasky Kok
* | SNI was added in OpenSSL 0.9.8f [11 Oct 2007], tooChristian Heimes2013-11-281-1/+1
| |
* | Encapsulate cpickle global state in a dedicated object.Alexandre Vassalotti2013-11-281-270/+426
| | | | | | | | | | This implements PEP 3121 module finalization as well. This change does not cause any significant impact on performance.
* | Closes #19786: tracemalloc, remove the arbitrary limit of 100 framesVictor Stinner2013-11-271-21/+34
| | | | | | | | | | | | | | | | The limit is now 178,956,969 on 64 bit (it is greater on 32 bit because structures are smaller). Use int instead of Py_ssize_t to store the number of frames to have smaller traceback_t objects.
* | Close #19798: replace "maximum" term with "peak" in get_traced_memory()Victor Stinner2013-11-271-12/+12
| | | | | | | | documentation. Use also the term "current" for the current size.
* | add SO_PRIORITY (closes #19802)Benjamin Peterson2013-11-271-0/+3
| | | | | | | | Patch by Claudiu Popa.
* | Combine the FastCall functions in cpickle.Alexandre Vassalotti2013-11-271-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.
* | Issue #11489: JSON decoder now accepts lone surrogates.Serhiy Storchaka2013-11-261-19/+7
|\ \ | |/
| * Issue #11489: JSON decoder now accepts lone surrogates.Serhiy Storchaka2013-11-261-19/+7
| |
* | tracemalloc: fix get_traced_memory() docstring for result typeVictor Stinner2013-11-261-1/+1
| |
* | Issue #18874: Fix typoVictor Stinner2013-11-261-1/+1
| |
* | Issue #18874: make it more explicit than set_reentrant() only accept 0 or 1Victor Stinner2013-11-261-0/+1
| |
* | Issue #18874: tracemalloc: Comment the trace_t structureVictor Stinner2013-11-261-0/+4
| |
* | Issue #18874: tracemalloc: explain the purpose of get_traces.tracebacks in a ↵Victor Stinner2013-11-251-0/+2
| | | | | | | | comment
* | Issue #19752: Fix "HAVE_DEV_PTMX" implementation of os.openpty()Victor Stinner2013-11-251-1/+5
| | | | | | | | | | | | | | | | Regression introduced by the implementation of the PEP 446 (non-inheritable file descriptors by default). master_fd must be set non-inheritable after the creation of the slave_fd, otherwise grantpt(master_fd) fails with EPERM (errno 13).
* | Reverting e39db21df580 eagerly due to buildbot failures.Alexandre Vassalotti2013-11-251-33/+90
| |
* | Combine _Pickler_FastCall and _Unpickler_FastCall in cpickle.Alexandre Vassalotti2013-11-251-90/+33
| |
* | Issue #19739: Try to fix compiler warnings on 32-bit Windows.Alexandre Vassalotti2013-11-251-22/+21
| |
* | Close #19762: Fix name of _get_traces() and _get_object_traceback() functionVictor Stinner2013-11-251-2/+2
| | | | | | | | name in their docstring. Patch written by Vajrasky Kok.
* | Merge save_int into save_long in cpickle to remove redundant code.Alexandre Vassalotti2013-11-251-53/+33
| | | | | | | | Also, replace unnessary uses of the #if preprocessor directive.
* | Simplify save_bool in cpickle.Alexandre Vassalotti2013-11-251-18/+11
| |
* | Use Clinic to process arguments in cpickle.Alexandre Vassalotti2013-11-241-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.
* | Merge from 3.3.Stefan Krah2013-11-243-36/+326
|\ \ | |/
| * 1) Prepare libmpdec for the 2.4.0 release. None of the following changes ↵Stefan Krah2013-11-243-36/+326
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | affects _decimal: o Make all "mpd_t to C integer" conversion functions available in both the 64-bit and the 32-bit versions. o Make all mixed mpd_t/C integer arithmetic functions available in the 32-bit version. o Better handling of __STDC_LIMIT_MACROS for C++ users. o Add struct tags (at the request of C++ users). 2) Check for libmpdec.so.2 if --with-system-libmpdec is used.
* | Issue #19636: Fix usage of MAX_PATH in posixmodule.cVictor Stinner2013-11-241-14/+14
| |
* | Issue #19636: Fix posix__getvolumepathname(), raise an OverflowError ifVictor Stinner2013-11-241-5/+14
| | | | | | | | the length doesn't fit in an DWORD
* | Cosmetic fixesEli Bendersky2013-11-241-13/+8
| |
* | Clinic: fix "self converters" with METH_NOARGS functions.Larry Hastings2013-11-241-41/+46
| |
* | Issue #19741: cleanup tracemalloc_realloc()Victor Stinner2013-11-241-8/+15
| | | | | | | | Explain that unhandled error case is very unlikely
* | Remove code path in cpickle that does not exist in pickle.Alexandre Vassalotti2013-11-241-7/+1
| |
* | Issue #19741: tracemalloc: report tracemalloc_log_alloc() failure to the callerVictor Stinner2013-11-241-18/+29
| | | | | | | | for new allocations, but not when a memory block was already resized
* | Make Ellipsis and NotImplemented picklable through the reduce protocol.Alexandre Vassalotti2013-11-241-32/+0
| |
* | Make built-in methods picklable through the reduce protocol.Alexandre Vassalotti2013-11-241-32/+0
| |
* | Issue #19741: fix tracemalloc_log_alloc(), handle _Py_HASHTABLE_SET() failureVictor Stinner2013-11-241-7/+16
| |
* | Make framing optional in pickle protocol 4.Alexandre Vassalotti2013-11-241-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.
* | Issue #19674: inspect.signature() now produces a correct signatureLarry Hastings2013-11-239-56/+116
| | | | | | | | for some builtins.
* | Issue #19730: Argument Clinic now supports all the existing PyArgLarry Hastings2013-11-235-67/+182
| | | | | | | | | | "format units" as legacy converters, as well as two new features: "self converters" and the "version" directive.
* | Issue #19722: Added opcode.stack_effect(), which accuratelyLarry Hastings2013-11-231-0/+116
| | | | | | | | computes the stack effect of bytecode instructions.
* | Issue #16203: Add re.fullmatch() function and regex.fullmatch() method,Serhiy Storchaka2013-11-233-25/+81
| | | | | | | | | | | | which anchor the pattern at both ends of the string to match. Original patch by Matthew Barnett.
* | Issue #13592: Improved the repr for regular expression pattern objects.Serhiy Storchaka2013-11-232-1/+83
| | | | | | | | Based on patch by Hugo Lopes Tavares.
* | Fix signed / unsigned comparisonAntoine Pitrou2013-11-231-1/+1
| |
* | Issue #19641: Added the audioop.byteswap() function to convert big-endianSerhiy Storchaka2013-11-231-0/+32
| | | | | | | | samples to little-endian and vice versa.
* | gcc doesn't realize that dummy is always initialized by the function callGregory P. Smith2013-11-231-1/+1
| | | | | | | | | | and warns about potential uninitialized use. Silence that by initializing it to null.
* | mergeChristian Heimes2013-11-231-2/+8
|\ \
| * \ Merge headsSerhiy Storchaka2013-11-231-11/+24
| |\ \