Skip to content

Commit 763fb33

Browse files
authored
gh-160239: Remove dead _repr_info() methods from asyncio.windows_events (#160241)
1 parent 0dd6a4d commit 763fb33

2 files changed

Lines changed: 1 addition & 17 deletions

File tree

‎Lib/asyncio/windows_events.py‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ def __init__(self, ov, *, loop=None):
5555
del self._source_traceback[-1]
5656
self._ov = ov
5757

58-
def _repr_info(self):
59-
info = super()._repr_info()
60-
if self._ov is not None:
61-
state = 'pending' if self._ov.pending else 'completed'
62-
info.insert(1, f'overlapped=<{state}, {self._ov.address:#x}>')
63-
return info
64-
6558
def _cancel_overlapped(self):
6659
if self._ov is None:
6760
return
@@ -113,16 +106,6 @@ def _poll(self):
113106
return (_winapi.WaitForSingleObject(self._handle, 0) ==
114107
_winapi.WAIT_OBJECT_0)
115108

116-
def _repr_info(self):
117-
info = super()._repr_info()
118-
info.append(f'handle={self._handle:#x}')
119-
if self._handle is not None:
120-
state = 'signaled' if self._poll() else 'waiting'
121-
info.append(state)
122-
if self._wait_handle is not None:
123-
info.append(f'wait_handle={self._wait_handle:#x}')
124-
return info
125-
126109
def _unregister_wait_cb(self, fut):
127110
# The wait was unregistered: it's not safe to destroy the Overlapped
128111
# object
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove dead and broken ``_repr_info()`` methods from ``asyncio.windows_events``; they called ``Future._repr_info()``, which no longer exists.

0 commit comments

Comments
 (0)