summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-29 11:36:00 +0200
committerVictor Stinner <victor.stinner@gmail.com>2014-07-29 11:36:00 +0200
commit608d747b32686bfdeefae206810f17f72a2c82b5 (patch)
treeb17c5c9b95b99b75f9611fb95d5e6ee3c9b32146
parent9d8976897d1a550d3296809c08d4c6f6f04348c7 (diff)
downloadtrollius-608d747b32686bfdeefae206810f17f72a2c82b5.tar.gz
_WaitHandleFuture and _OverlappedFuture: hide frames of internal calls in the
source traceback.
-rw-r--r--asyncio/windows_events.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/asyncio/windows_events.py b/asyncio/windows_events.py
index 1db255e..a5d9b21 100644
--- a/asyncio/windows_events.py
+++ b/asyncio/windows_events.py
@@ -83,6 +83,8 @@ class _WaitHandleFuture(futures.Future):
def __init__(self, handle, wait_handle, *, loop=None):
super().__init__(loop=loop)
+ if self._source_traceback:
+ del self._source_traceback[-1]
self._handle = handle
self._wait_handle = wait_handle
@@ -399,6 +401,8 @@ class IocpProactor:
wh = _overlapped.RegisterWaitWithQueue(
handle, self._iocp, ov.address, ms)
f = _WaitHandleFuture(handle, wh, loop=self._loop)
+ if f._source_traceback:
+ del f._source_traceback[-1]
def finish_wait_for_handle(trans, key, ov):
# Note that this second wait means that we should only use
@@ -431,6 +435,8 @@ class IocpProactor:
# operation when it completes. The future's value is actually
# the value returned by callback().
f = _OverlappedFuture(ov, loop=self._loop)
+ if f._source_traceback:
+ del f._source_traceback[-1]
if not ov.pending and not wait_for_post:
# The operation has completed, so no need to postpone the
# work. We cannot take this short cut if we need the