Commit Graph

87946 Commits

Author SHA1 Message Date
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
Raymond Hettinger
91496a08d4 merge 2015-01-29 22:02:17 -08:00
Raymond Hettinger
c5644126a2 Move the set search finger before the smalltable. 2015-01-29 22:00:32 -08:00
R David Murray
6ef0285aec Merge: Fix asyncio doc typo. 2015-01-29 19:54:03 -05:00
R David Murray
756f0b1982 Fix asyncio doc typo. 2015-01-29 19:53:33 -05:00
Victor Stinner
fc37abf3ee Merge 3.4 (asyncio doc) 2015-01-30 01:39:01 +01:00
Victor Stinner
188f2c0b75 asyncio doc: document the new ResourceWarning warnings 2015-01-30 01:35:14 +01: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
151b23562e Merge 3.4 (asyncio doc) 2015-01-30 00:56:10 +01:00
Victor Stinner
1077dee457 asyncio doc: add a section about task cancellation 2015-01-30 00:55:58 +01:00
Victor Stinner
ff5d085fde Merge 3.4 (asyncio doc) 2015-01-30 00:37:22 +01:00
Victor Stinner
7a55b88d9c Issue #21962, asyncio doc: Suggest the usage of wait_for() to replace
the lack of timeout parameter for locks and queues.
2015-01-30 00:37:04 +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