82293 Commits

Author SHA1 Message Date
Guido van Rossum
de3a1363a9 asyncio: Add 'shield' to __all__. 2013-11-29 09:29:00 -08:00
Brett Cannon
d2476c6e4b Issue #19698: Remove exec_module() from the built-in and extension
module loaders.

Due to the fact that the call signatures for extension modules and
built-in modules does not allow for the specifying of what module to
initialize and that on Windows all extension modules are built-in
modules, work to clean up built-in and extension module initialization
will have to wait until Python 3.5. Because of this the semantics of
exec_module() would be incorrect, so removing the methods for now is
the best option; load_module() is still used as a fallback by
importlib and so this won't affect semantics.
2013-11-29 11:00:11 -05:00
Serhiy Storchaka
0e90e99188 Issue #19795: Improved markup of True/False constants. 2013-11-29 12:19:53 +02:00
Serhiy Storchaka
fbc1c26803 Issue #19795: Improved markup of True/False constants. 2013-11-29 12:17:13 +02: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
b6e66ebdf7 Some minor clarifications in the documentation of pathlib + inheritance diagram 2013-11-28 06:53:05 -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
Christian Heimes
dec813f118 ssl.create_default_context() sets OP_NO_COMPRESSION to prevent CRIME 2013-11-28 08:06:54 +01:00
Zachary Ware
50a5dad608 Issue #19595: Re-enable a long-disabled test in test_winsound 2013-11-27 23:56:04 -06: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
Ned Deily
c034156f26 Change pathlib documentation to use "raise" instead of "throw". 2013-11-27 14:42:55 -08:00
Victor Stinner
5362abf4ec Issue #19818: tracemalloc, the number of frame limit cannot be zero anymore 2013-11-27 23:39:55 +01:00
Guido van Rossum
a5062c5d81 asyncio: Change write buffer use to avoid O(N**2). Make write()/sendto() accept bytearray/memoryview too. Change some asserts with proper exceptions. 2013-11-27 14:12:48 -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
Guido van Rossum
cced076218 asyncio: Fix get_event_loop() to call set_event_loop() when setting the loop. By Anthony Baire. 2013-11-27 10:37:13 -08: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
ba9d75e1be Skip test_find_mac on Windows (issue #19804).
This test requires the ifconfig executable on $PATH, /sbin/, or /usr/sbin.
2013-11-27 08:58:13 +02:00
Serhiy Storchaka
c303cfdb8a Skip test_find_mac on Windows (issue #19804).
This test requires the ifconfig executable on $PATH, /sbin/, or /usr/sbin.
2013-11-27 08:57:51 +02:00
Benjamin Peterson
5143ce5a01 merge 3.3 (#19805) 2013-11-26 23:05:37 -06:00
Benjamin Peterson
b152e177ef recommend OrderedDict for this FAQ (closes #19805) 2013-11-26 23:05:25 -06:00
Benjamin Peterson
d75803c1fc merge 3.3 (#19729) 2013-11-26 19:24:01 -06:00
Benjamin Peterson
0ee22bf774 fix format spec recursive expansion (closes #19729) 2013-11-26 19:22:36 -06:00
Zachary Ware
14fff88773 Issue #19788: kill_python(_d).exe is now run as a PreBuildEvent on the
pythoncore sub-project.  This should prevent build errors due a previous
build's python(_d).exe still running.
2013-11-26 16:34:45 -06:00
Zachary Ware
bb65b5bf1d Issue #19788: kill_python(_d).exe is now run as a PreBuildEvent on the
pythoncore sub-project.  This should prevent build errors due a previous
build's python(_d).exe still running.
2013-11-26 16:32:59 -06:00
Zachary Ware
6a228330d0 Merge with 3.3 2013-11-26 14:58:10 -06:00
Zachary Ware
910b1c3993 Merge heads 2013-11-26 14:57:45 -06:00
Zachary Ware
99fb0513dd Merge heads 2013-11-26 14:57:10 -06:00
Zachary Ware
29f8cb64e6 Issue #19588: Merge with 3.3 2013-11-26 14:54:21 -06:00
Zachary Ware
a6edea530b Issue #19588: Fixed tests in test_random that were silently skipped most
of the time.  Patch by Julian Gindi.
2013-11-26 14:50:10 -06:00
Serhiy Storchaka
822963ed5d Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with
virtual interface.  Original patch by Kent Frazier.
2013-11-26 22:49:36 +02:00
Serhiy Storchaka
56507c7862 Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with
virtual interface.  Original patch by Kent Frazier.
2013-11-26 22:47:16 +02:00
Mark Dickinson
518e6ee98b Use @bigmemtest more accurately. 2013-11-26 20:29:06 +00:00
Mark Dickinson
a04f4e0374 Use @bigmemtest more accurately. 2013-11-26 20:28:29 +00:00
Serhiy Storchaka
03cc56539f Issue #19793: Improved markup for True/False constants in pathlib documentation. 2013-11-26 21:37:12 +02: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
Mark Dickinson
1df88677e9 Issue #19638: Merge from 3.3 2013-11-26 16:19:38 +00:00
Mark Dickinson
f45bbb6211 Issue #19638: Raise ValueError instead of crashing when converting billion character strings to float. 2013-11-26 16:19:13 +00:00
Serhiy Storchaka
6bfe39272e Issue #19794: Improved markup for True/False constants. 2013-11-26 17:33:13 +02:00
Serhiy Storchaka
22dc4d5fa8 Issue #19794: Improved markup for True/False constants. 2013-11-26 17:32:16 +02:00
Serhiy Storchaka
eaec3597dd Issue #19760: Silence sysconfig's 'SO' key deprecation warnings in tests.
Change stacklevel in warnings.warn() for 'SO' key to 2.
2013-11-26 17:08:24 +02:00
Victor Stinner
59463d8340 tracemalloc: fix get_traced_memory() docstring for result type 2013-11-26 10:46:06 +01:00
Victor Stinner
802a484e24 tracemalloc: Fix hash methods of Statistic and StatisticDiff 2013-11-26 10:16:25 +01:00