Commit Graph

88940 Commits

Author SHA1 Message Date
Serhiy Storchaka 9c1a9b2657 Issue #2211: Updated the implementation of the http.cookies.Morsel class.
Setting attributes key, value and coded_value directly now is deprecated.
update() and setdefault() now transform and check keys.  Comparing for
equality now takes into account attributes key, value and coded_value.
copy() now returns a Morsel, not a dict.  repr() now contains all attributes.
Optimized checking keys and quoting values.  Added new tests.
Original patch by Demian Brecht.
2015-03-18 10:59:57 +02:00
Vinay Sajip 3505bd82a9 Issue #23207: merged fix from 3.4. 2015-03-18 08:49:57 +00:00
Vinay Sajip d55436ace3 Issue #23207: Improved kwarg validation. 2015-03-18 08:47:58 +00:00
Victor Stinner e42ccd2bfd Issue #23694: Enhance _Py_fopen(), it now raises an exception on error
* If fopen() fails, OSError is raised with the original filename object.
* The GIL is now released while calling fopen()
2015-03-18 01:39:23 +01:00
Victor Stinner a555cfcb73 Issue #23694: Enhance _Py_open(), it now raises exceptions
* _Py_open() now raises exceptions on error. If open() fails, it raises an
  OSError with the filename.
* _Py_open() now releases the GIL while calling open()
* Add _Py_open_noraise() when _Py_open() cannot be used because the GIL is not
  held
2015-03-18 00:22:14 +01:00
Victor Stinner 6562b29e13 Issue #23644: Fix issues with C++ when compiling Python extensions
Disable completly pyatomic.h on C++, because <stdatomic.h> is not compatible with C++.

<pyatomic.h> is only needed by the optimized PyThreadState_GET() macro in
pystate.h. Instead, declare PyThreadState_GET() as an alias to
PyThreadState_Get(), as done for limited API.
2015-03-17 22:53:27 +01:00
Robert Collins b28de01992 Fix patch attribution for issue 18983. 2015-03-18 09:59:33 +13:00
Robert Collins 302dbc6792 Issue #18983: Allow selection of output units in timeit.
This allows manual selection of a specific unit such as usecs rather than the
use of a heuristic. This is intended to aid machine processing of timeit
output.

Patch by Serhiy Storchaka.
2015-03-18 09:54:50 +13:00
Victor Stinner f024d263b4 Issue #23685: Fix usage of PyMODINIT_FUNC in _json, _scproxy, nis, pyexpat
_codecs_cn, _codecs_hk, _codecs_iso2022, _codecs_jp, _codecs_kr and _codecs_tw
modules.

pyexpat.c doesn't need to redeclare PyMODINIT_FUNC, it's already declared in
Include/pyport.h.
2015-03-17 17:48:27 +01:00
Ned Deily beb09977bc Issue #22585: null merge 2015-03-17 04:32:30 -07:00
Ned Deily ab6b9f8a5b Issue #22585: make URandomFDTests test case actually run 2015-03-17 04:30:08 -07:00
Victor Stinner 0c2fd89777 Revert changeset d927047b1d8eb87738676980a24930d053ba2150
Sorry, it was a mistake, the patch is still under review: issue #23646.
2015-03-17 10:49:17 +01:00
Berker Peksag e010d8f031 Issue #23682: Delete Python 2.2 mention from distutils documentation.
Patch by Thomas Kluyver.
2015-03-17 06:56:11 +02:00
Berker Peksag 6a98002d47 Issue #23682: Delete Python 2.2 mention from distutils documentation.
Patch by Thomas Kluyver.
2015-03-17 06:55:48 +02:00
Benjamin Peterson 85586ebc39 merge 3.4 (#23679) 2015-03-16 12:45:27 -05:00
Benjamin Peterson 59c4eb71f2 versionchanged for rc4 removal (closes #23679) 2015-03-16 12:43:38 -05:00
Victor Stinner 9c182a1e25 Issue #23680: Reduce risk of race condition in check_interrupted_write() of
test_io. Allocate the large data before scheduling an alarm in 1 second.

On very slow computer, the alarm rings sometimes during the memory allocation.
2015-03-16 18:03:06 +01:00
Victor Stinner 6d3c09f284 Issue #23680: Reduce risk of race condition in check_interrupted_write_retry()
of test_io. Allocate the large data before scheduling an alarm in 1 second.

On very slow computer, the alarm rings sometimes during the memory allocation.
2015-03-16 17:57:49 +01:00
Victor Stinner 59b356d659 Issue #23571: Restore removed assert(!PyErr_Occurred()); in
PyEval_CallObjectWithKeywords()

Sorry Serhiy, I missed your explanation because the review email was moved to
my Spam folder :-(
2015-03-16 11:52:32 +01:00
Serhiy Storchaka b8a78d3d85 Use non-zero and non-last positions in error handler tests. 2015-03-16 08:31:38 +02:00
Serhiy Storchaka 05d54730da Use non-zero and non-last positions in error handler tests. 2015-03-16 08:29:47 +02:00
Robert Collins c7965e0c21 Issue #23585: make patchcheck will ensure the interpreter is built. 2015-03-16 15:30:31 +13:00
Robert Collins bbb8ade904 Issue #23631: Fix traceback.format_list when a traceback has been mutated. 2015-03-16 15:27:16 +13:00
Serhiy Storchaka 93f4d4c1d6 Increased coverage of standard codec error handlers. 2015-03-15 23:43:34 +02:00
Serhiy Storchaka 98d156b2b2 Increased coverage of standard codec error handlers. 2015-03-15 23:41:37 +02:00
Eli Bendersky a84099bcc5 Issue #23549: Clarify confusion in heapq doc - accessing the mininmal element
Merge 3.4

The current documentation only mentions heap[0] as the smallest element in the
beginning, and not in any of the methods' docs. There's no method to access the
minimal element without popping it, and the documentation of nsmallest is
confusing because it may suggest that min() is the way to go for n==1.
2015-03-14 20:17:38 -07:00
Eli Bendersky 39430daa3b Issue #23549: Clarify confusion in heapq doc - accessing the mininmal element
The current documentation only mentions heap[0] as the smallest element in the
beginning, and not in any of the methods' docs. There's no method to access the
minimal element without popping it, and the documentation of nsmallest is
confusing because it may suggest that min() is the way to go for n==1.
2015-03-14 20:14:23 -07:00
Berker Peksag 7aaa85932c Issue #23568: Add rdivmod support to MagicMock() objects.
Patch by Håkan Lövdahl.
2015-03-15 01:57:38 +02:00
Berker Peksag a785dece57 Issue #23568: Add rdivmod support to MagicMock() objects.
Patch by Håkan Lövdahl.
2015-03-15 01:51:56 +02:00
Berker Peksag 102029dfd6 Issue #2052: Add charset parameter to HtmlDiff.make_file(). 2015-03-15 01:18:47 +02:00
Serhiy Storchaka fbd011dd49 Fix minor docs markup errors. 2015-03-14 21:34:25 +02:00
Serhiy Storchaka b19542d062 Fix minor docs markup errors. 2015-03-14 21:32:57 +02:00
Steve Dower a2a9df9240 Issue #23606: Temporarily suppress test for CRT name. 2015-03-14 11:48:44 -07:00
Steve Dower 9aa31d5479 Fixes incorrect use of GetLastError where errno should be used. 2015-03-14 11:39:18 -07:00
Steve Dower 41e7244c06 Fixes incorrect use of GetLastError where errno should be used. 2015-03-14 11:38:27 -07:00
Benjamin Peterson 76c95a01dc merge 3.4 2015-03-13 16:21:29 -05:00
Benjamin Peterson 0d70ab6b8c __getslice__ certainly won't appear in the output 2015-03-13 16:21:23 -05:00
Brett Cannon cb1dde5df5 Merge 3.4 2015-03-13 12:50:16 -04:00
Brett Cannon 2645bad04f Make the case to only support Python 2.7 when supporting 2/3 simultaneously 2015-03-13 12:49:44 -04:00
Brett Cannon 469d0fbdd3 Add some periods to the ends of a couple comments 2015-03-13 11:13:20 -04:00
Brett Cannon 64e4f7f96d Strip trailing whitespace 2015-03-13 10:42:08 -04:00
Brett Cannon cc4dfc1b75 Issue #23491: Implement PEP 441: Improving Python Zip Application Support
Thanks to Paul Moore for the PEP and implementation.
2015-03-13 10:40:49 -04:00
Victor Stinner ff2a661ef0 Issue #23566: Skip "fd" tests of test_faulthandler on Windows
subprocess doesn't support pass_fds on Windows.
2015-03-13 11:01:30 +01:00
Serhiy Storchaka 577fc4e87f Issue #23138: Fixed parsing cookies with absent keys or values in cookiejar.
Patch by Demian Brecht.
2015-03-13 09:05:01 +02:00
Serhiy Storchaka 79fbeee237 Issue #23051: multiprocessing.Pool methods imap() and imap_unordered() now
handle exceptions raised by an iterator.  Patch by Alon Diamant and Davin
Potts.
2015-03-13 08:25:26 +02:00
Benjamin Peterson f0f14f72bb use the meth role for ZipFile.open 2015-03-12 22:41:06 -05:00
Berker Peksag 32799953b0 Issue #23081: Document that PySequence_List also accepts iterables.
Patch by Lars Buitinck.
2015-03-13 02:55:45 +02:00
Berker Peksag ce77ee9183 Issue #22154: Add an example to show context management protocol support of ZipFile.open().
Patch by Mike Short.
2015-03-13 02:29:54 +02:00
Serhiy Storchaka a60c2fe480 Issue #23641: Cleaned out legacy dunder names from tests and docs.
Fixed 2 to 3 porting bug in pynche.ColorDB.
2015-03-12 21:56:08 +02:00
Berker Peksag 18987a11ce Issue #20617: Remove unused import in test_ssl.
Patch by Mark Lawrence.
2015-03-12 18:50:49 +02:00