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()
This commit is contained in:
Victor Stinner 2015-01-29 14:15:19 +01:00
parent 54a231d539
commit 2934262fd3
5 changed files with 86 additions and 45 deletions

View file

@ -592,7 +592,7 @@ def gather(*coros_or_futures, loop=None, return_exceptions=False):
fut.exception()
return
if fut._state == futures._CANCELLED:
if fut.cancelled():
res = futures.CancelledError()
if not return_exceptions:
outer.set_exception(res)