[Python-checkins] cpython (merge 3.4 -> default): Merge 3.4 (asyncio)
victor.stinner
python-checkins at python.org
Thu Jan 22 00:19:07 CET 2015
https://hg.python.org/cpython/rev/69265fcade13
changeset: 94235:69265fcade13
parent: 94232:15671d3aaca3
parent: 94234:d3804307cce4
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Jan 22 00:18:11 2015 +0100
summary:
Merge 3.4 (asyncio)
files:
Lib/asyncio/base_events.py | 2 +-
Lib/asyncio/windows_events.py | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -636,7 +636,7 @@
try:
yield from waiter
- except Exception:
+ except:
transport.close()
raise
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py
--- a/Lib/asyncio/windows_events.py
+++ b/Lib/asyncio/windows_events.py
@@ -163,6 +163,9 @@
self._done_callback = None
+ def cancel(self):
+ raise RuntimeError("_WaitCancelFuture must not be cancelled")
+
def _schedule_callbacks(self):
super(_WaitCancelFuture, self)._schedule_callbacks()
if self._done_callback is not None:
@@ -693,6 +696,9 @@
# FIXME: Tulip issue 196: remove this case, it should not happen
elif fut.done() and not fut.cancelled():
del self._cache[address]
+ elif isinstance(fut, _WaitCancelFuture):
+ # _WaitCancelFuture must not be cancelled
+ pass
else:
try:
fut.cancel()
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list