Christian Heimes
1aa9a75fbf
Issue #19509 : Add SSLContext.check_hostname to match the peer's certificate
...
with server_hostname on handshake.
2013-12-02 02:41:19 +01:00
Charles-François Natali
5abca14b00
Issue #18994 : Add a missing check for a return value in fcntmodule. Patch by
...
Vajrasky Kok.
2013-12-01 14:30:47 +01:00
Victor Stinner
be0708f066
Closes #19831 : Stop tracemalloc later at Python shutdown to be able to use
...
tracemalloc in objects destructor
Replace atexit handler with an harcoded C function _PyTraceMalloc_Fini().
2013-12-01 10:03:26 +01:00
Gregory P. Smith
54532c9742
Undo supposed fix for Issue #15798 until I understand why this is
...
causing test_multiprocessing_forkserver and test_multiprocessing_spawn
failures on head (3.4).
2013-12-01 00:13:35 -08:00
Gregory P. Smith
361e30c17a
Undo supposed fix for Issue #15798 until I understand why this is
...
causing test_multiprocessing_forkserver and test_multiprocessing_spawn
failures on head (3.4).
2013-12-01 00:12:24 -08:00
Gregory P. Smith
1c27e3c7fb
Fixes Issue #15798 - subprocess.Popen() no longer fails if file
...
descriptor 0, 1 or 2 is closed.
2013-11-30 19:04:00 -08:00
Gregory P. Smith
1eda9e7c30
Fixes Issue #15798 - subprocess.Popen() no longer fails if file
...
descriptor 0, 1 or 2 is closed.
2013-11-30 19:02:57 -08:00
Alexandre Vassalotti
2ccf8e969c
Issue #6477 : Merge with 3.3.
2013-11-30 17:58:53 -08:00
Alexandre Vassalotti
65846c6c51
Issue #6477 : Keep PyNotImplemented_Type and PyNone_Type private.
2013-11-30 17:55:48 -08:00
Alexandre Vassalotti
3c23e7a5dc
Issue #6477 : Merge with 3.3.
2013-11-30 16:21:20 -08:00
Alexandre Vassalotti
19b6fa6ebb
Issue #6477 : Added support for pickling the types of built-in singletons.
2013-11-30 16:06:39 -08:00
Alexandre Vassalotti
a1eedf9ff0
Merge with 3.3.
2013-11-30 13:55:39 -08:00
Alexandre Vassalotti
896414fedf
Fixed _pickle.Unpickler to handle empty persistent IDs correctly.
2013-11-30 13:52:35 -08:00
Serhiy Storchaka
6fe39b76a9
Issue #17897 : Optimized unpickle prefetching.
2013-11-30 23:15:38 +02:00
Alexandre Vassalotti
9730e33535
Issue #3693 : Fix array obscure error message when given a str.
2013-11-29 20:47:15 -08:00
Alexandre Vassalotti
567eba1852
Use PyDict_GetItemWithError instead of PyDict_GetItem in cpickle.
2013-11-28 17:09:16 -08:00
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.
2013-11-28 15:17:29 -08:00
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.
2013-11-28 14:56:09 -08:00
Eli Bendersky
8148164353
Issue #19815 : Fix segfault when parsing empty namespace declaration.
...
Based on patches by Christian Heimes and Vajrasky Kok
2013-11-28 06:35:40 -08:00
Eli Bendersky
4b79518f83
Fix indentation from previous commit
2013-11-28 06:33:21 -08:00
Eli Bendersky
5dd40e555b
Issue #19815 : Fix segfault when parsing empty namespace declaration.
...
Based on patches by Christian Heimes and Vajrasky Kok
2013-11-28 06:31:58 -08:00
Christian Heimes
470fba1f9f
SNI was added in OpenSSL 0.9.8f [11 Oct 2007], too
2013-11-28 15:12:15 +01:00
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.
2013-11-27 19:36:52 -08:00
Victor Stinner
f28ce60441
Closes #19786 : tracemalloc, remove the arbitrary limit of 100 frames
...
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.
2013-11-27 22:27:13 +01:00
Victor Stinner
3c0481d426
Close #19798 : replace "maximum" term with "peak" in get_traced_memory()
...
documentation. Use also the term "current" for the current size.
2013-11-27 21:39:49 +01:00
Benjamin Peterson
1314ef73d0
add SO_PRIORITY ( closes #19802 )
...
Patch by Claudiu Popa.
2013-11-27 09:18:54 -06:00
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.
2013-11-27 02:26:54 -08:00
Serhiy Storchaka
687ff0ecdf
Issue #11489 : JSON decoder now accepts lone surrogates.
2013-11-26 21:27:11 +02:00
Serhiy Storchaka
c93329b3dd
Issue #11489 : JSON decoder now accepts lone surrogates.
2013-11-26 21:25:28 +02:00
Victor Stinner
59463d8340
tracemalloc: fix get_traced_memory() docstring for result type
2013-11-26 10:46:06 +01:00
Victor Stinner
4dc74204c1
Issue #18874 : Fix typo
2013-11-26 01:18:52 +01:00
Victor Stinner
2ead3d2448
Issue #18874 : make it more explicit than set_reentrant() only accept 0 or 1
2013-11-26 01:08:53 +01:00
Victor Stinner
7a5be14dd8
Issue #18874 : tracemalloc: Comment the trace_t structure
2013-11-26 01:06:02 +01:00
Victor Stinner
de2f132a5e
Issue #18874 : tracemalloc: explain the purpose of get_traces.tracebacks in a comment
2013-11-26 00:26:23 +01:00
Victor Stinner
000de53624
Issue #19752 : Fix "HAVE_DEV_PTMX" implementation of os.openpty()
...
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).
2013-11-25 23:19:58 +01:00
Alexandre Vassalotti
b4a04fb7e6
Reverting e39db21df580 eagerly due to buildbot failures.
2013-11-25 13:25:12 -08:00
Alexandre Vassalotti
f94a041f8f
Combine _Pickler_FastCall and _Unpickler_FastCall in cpickle.
2013-11-25 13:03:32 -08:00
Alexandre Vassalotti
1048fb5539
Issue #19739 : Try to fix compiler warnings on 32-bit Windows.
2013-11-25 11:35:46 -08:00
Victor Stinner
4fbefdb217
Close #19762 : Fix name of _get_traces() and _get_object_traceback() function
...
name in their docstring. Patch written by Vajrasky Kok.
2013-11-25 09:33:18 +01:00
Alexandre Vassalotti
ded929b300
Merge save_int into save_long in cpickle to remove redundant code.
...
Also, replace unnessary uses of the #if preprocessor directive.
2013-11-24 22:41:13 -08:00
Alexandre Vassalotti
8a67f52463
Simplify save_bool in cpickle.
2013-11-24 21:40:18 -08:00
Alexandre Vassalotti
ed8c906127
Use Clinic to process arguments in cpickle.
...
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.
2013-11-24 12:25:48 -08:00
Stefan Krah
daa96b7669
Merge from 3.3.
2013-11-24 19:56:23 +01:00
Stefan Krah
45059eb1d0
1) Prepare libmpdec for the 2.4.0 release. None of the following changes 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.
2013-11-24 19:44:57 +01:00
Victor Stinner
7587507a97
Issue #19636 : Fix usage of MAX_PATH in posixmodule.c
2013-11-24 19:23:25 +01:00
Victor Stinner
6edddfaf5b
Issue #19636 : Fix posix__getvolumepathname(), raise an OverflowError if
...
the length doesn't fit in an DWORD
2013-11-24 19:22:57 +01:00
Eli Bendersky
163d7f02a1
Cosmetic fixes
2013-11-24 06:55:04 -08:00
Larry Hastings
dc6aaec9e3
Clinic: fix "self converters" with METH_NOARGS functions.
2013-11-24 04:41:57 -08:00
Victor Stinner
08facd2009
Issue #19741 : cleanup tracemalloc_realloc()
...
Explain that unhandled error case is very unlikely
2013-11-24 12:27:59 +01:00
Alexandre Vassalotti
fc91285c93
Remove code path in cpickle that does not exist in pickle.
2013-11-24 03:07:35 -08:00