Commit Graph

36468 Commits

Author SHA1 Message Date
Victor Stinner 29ae7633e0 Merge 3.4 (asyncio) 2015-02-02 18:36:59 +01:00
Victor Stinner 5d44c08f1c Issue #23353, asyncio: Workaround CPython bug #23353
Don't use yield/yield-from in an except block of a generator. Store the
exception and handle it outside the except block.
2015-02-02 18:36:31 +01:00
Benjamin Peterson f86d1fdab7 merge 3.4 (#21295) 2015-02-02 10:52:56 -05:00
Benjamin Peterson 7a66fc22ad revert lineno and col_offset changes from #16795 (closes #21295) 2015-02-02 10:51:20 -05:00
Benjamin Peterson 5d0bb852a2 merge 3.4 (#23364, #23363) 2015-02-01 21:36:01 -05:00
Benjamin Peterson c468b537cd merge 3.3 (#23364, #23363) 2015-02-01 21:35:34 -05:00
Benjamin Peterson 0eaabf1c05 check for overflows in permutations() and product() (closes #23363, closes #23364) 2015-02-01 21:34:07 -05:00
Benjamin Peterson 38d9772622 merge 3.4 (#23365) 2015-02-01 21:11:54 -05:00
Benjamin Peterson f635dc32b1 merge 3.3 (#23365) 2015-02-01 21:11:39 -05:00
Benjamin Peterson 6f082297b2 check for overflow in combinations_with_replacement (closes #23365) 2015-02-01 21:10:47 -05:00
Benjamin Peterson 4db56d5002 merge 3.4 (#23366) 2015-02-01 21:01:43 -05:00
Benjamin Peterson 819c4e9bc4 merge 3.3 (#23366) 2015-02-01 21:00:15 -05:00
Benjamin Peterson 4b40eeb339 detect overflow in combinations (closes #23366) 2015-02-01 20:59:00 -05:00
Benjamin Peterson ad9f99e41f merge 3.4 2015-02-01 20:18:29 -05:00
Benjamin Peterson d40f136d35 https goodness 2015-02-01 20:17:22 -05:00
Benjamin Peterson 337578b242 fix tests on systems that can't validate python.org 2015-02-01 20:16:59 -05:00
Benjamin Peterson 83e814d852 merge 3.4 2015-02-01 18:02:21 -05:00
Benjamin Peterson c0b743a97b merge 3.3 2015-02-01 18:02:15 -05:00
Benjamin Peterson 68389eaa3f remove extra ws 2015-02-01 18:02:09 -05:00
Benjamin Peterson 71cf91cc09 merge 3.4 (#23369) 2015-02-01 18:00:19 -05:00
Benjamin Peterson 3675cd9db1 merge 3.3 (#23369) 2015-02-01 17:59:49 -05:00
Benjamin Peterson e3bfe19358 fix possible overflow in encode_basestring_ascii (closes #23369) 2015-02-01 17:53:53 -05:00
Serhiy Storchaka 5b90f5de26 Don't seek to the start of the file when open ZipFile with the 'w' mode
(regression introduced in issue #14099).
2015-02-01 19:01:10 +02:00
Stefan Krah 363af44a4a Issue #22445: PyBuffer_IsContiguous() now implements precise contiguity
tests, compatible with NumPy's NPY_RELAXED_STRIDES_CHECKING compilation
flag.  Previously the function reported false negatives for corner cases.
2015-02-01 14:53:54 +01:00
Serhiy Storchaka 260cd320a1 Merge heads 2015-01-31 12:23:01 +02:00
Victor Stinner 13a1c6022b Merge 3.4 (generator) 2015-01-31 11:08:40 +01:00
Serhiy Storchaka 08448a1f4d Issue #23326: Removed __ne__ implementations. Since fixing default __ne__
implementation in issue #21408 they are redundant.
2015-01-31 12:05:05 +02:00
Serhiy Storchaka 57f7db3122 Issue #22765: Fixed test_gdb failures. Supressed unexpected gdb output.
Patch by Bohuslav Kabrda.
2015-01-31 11:50:22 +02:00
Serhiy Storchaka fdc995336f Issue #22765: Fixed test_gdb failures. Supressed unexpected gdb output.
Patch by Bohuslav Kabrda.
2015-01-31 11:48:52 +02:00
Victor Stinner 26f7b8acdc Issue #23353: Fix the exception handling of generators in PyEval_EvalFrameEx().
At entry, save or swap the exception state even if PyEval_EvalFrameEx() is
called with throwflag=0. At exit, the exception state is now always restored or
swapped, not only if why is WHY_YIELD or WHY_RETURN. Patch co-written with
Antoine Pitrou.
2015-01-31 10:29:47 +01:00
Benjamin Peterson 9d4cbcc86b allow changing __class__ between a heaptype and non-heaptype in some cases (closes #22986)
Patch by Nathaniel Smith.
2015-01-30 13:33:42 -05:00
Victor Stinner 934fa344c8 Merge 3.4 (asyncio) 2015-01-30 01:21:06 +01:00
Victor Stinner f2e43cbbd4 Issue #23347, asyncio: send_signal(), terminate(), kill() don't check if the
transport was closed. The check broken a Tulip example and this limitation is
arbitrary. Check if _proc is None should be enough.

Enhance also close(): do nothing when called the second time.
2015-01-30 01:20:44 +01:00
Victor Stinner 49b74d1a91 Merge 3.4 (asyncio) 2015-01-30 00:16:31 +01:00
Victor Stinner 1241ecc21b Issue #23347, asyncio: Make BaseSubprocessTransport.wait() private 2015-01-30 00:16:14 +01:00
Victor Stinner 698a9bd3ba Merge 3.4 (asyncio) 2015-01-30 00:11:55 +01:00
Victor Stinner 0698638d79 asyncio: Fix ResourceWarning in test_subprocess.test_proc_exit() 2015-01-30 00:11:42 +01:00
Victor Stinner a9373ec966 Merge 3.4 (asyncio) 2015-01-30 00:05:36 +01:00
Victor Stinner 47cd10d7a9 asyncio: sync with Tulip
Issue #23347: send_signal(), kill() and terminate() methods of
BaseSubprocessTransport now check if the transport was closed and if the
process exited.

Issue #23347: Refactor creation of subprocess transports. Changes on
BaseSubprocessTransport:

* Add a wait() method to wait until the child process exit
* The constructor now accepts an optional waiter parameter. The _post_init()
  coroutine must not be called explicitly anymore. It makes subprocess
  transports closer to other transports, and it gives more freedom if we want
  later to change completly how subprocess transports are created.
* close() now kills the process instead of kindly terminate it: the child
  process may ignore SIGTERM and continue to run. Call explicitly terminate()
  and wait() if you want to kindly terminate the child process.
* close() now logs a warning in debug mode if the process is still running and
  needs to be killed
* _make_subprocess_transport() is now fully asynchronous again: if the creation
  of the transport failed, wait asynchronously for the process eixt. Before the
  wait was synchronous. This change requires close() to *kill*, and not
  terminate, the child process.
* Remove the _kill_wait() method, replaced with a more agressive close()
  method. It fixes _make_subprocess_transport() on error.
  BaseSubprocessTransport.close() calls the close() method of pipe transports,
  whereas _kill_wait() closed directly pipes of the subprocess.Popen object
  without unregistering file descriptors from the selector (which caused severe
  bugs).

These changes simplifies the code of subprocess.py.
2015-01-30 00:05:19 +01:00
Victor Stinner 2647375cc9 Merge 3.4 (asyncio) 2015-01-30 00:04:27 +01:00
Victor Stinner 978a9afc6a Issue #23243, asyncio: Emit a ResourceWarning when an event loop or a transport
is not explicitly closed. Close also explicitly transports in test_sslproto.
2015-01-29 17:50:58 +01:00
Stefan Krah 29b40c1569 Issue #22668: Merge from 3.4. 2015-01-29 17:40:59 +01:00
Stefan Krah 3c0cf05901 Issue #22668: Remove endianness assumption in test. 2015-01-29 17:33:31 +01:00
Stefan Krah fc341bd4c5 Whitespace. 2015-01-29 14:33:37 +01:00
Stefan Krah f5324d7074 Closes #22668: Merge from 3.4. 2015-01-29 14:29:51 +01:00
Stefan Krah fa5d6a5ff3 Issue #22668: Ensure that format strings survive slicing after casting. 2015-01-29 14:27:23 +01:00
Victor Stinner 6d14405fdb Merge 3.4 (asyncio) 2015-01-29 14:15:42 +01:00
Victor Stinner 2934262fd3 asyncio: sync with Tulip
* Cleanup gather(): use cancelled() method instead of using private Future
  attribute
* Fix _UnixReadPipeTransport and _UnixWritePipeTransport. Only start reading
  when connection_made() has been called.
* Issue #23333: Fix BaseSelectorEventLoop._accept_connection(). Close the
  transport on error. In debug mode, log errors using call_exception_handler()
2015-01-29 14:15:19 +01:00
Victor Stinner 3e48d77bcb Merge 3.4 (asyncio doc) 2015-01-29 13:33:28 +01:00
Victor Stinner 54a231d539 asyncio doc: document Protocol state machine 2015-01-29 13:33:15 +01:00