Skip to content

Commit 9532c04

Browse files
miss-islingtonbdracokumaraditya303
authored
gh-101143: Remove references to TimerHandle from asyncio.base_events.BaseEventLoop._add_callback (GH-101197)
(cherry picked from commit 9e94767) Co-authored-by: J. Nick Koston <[email protected]> Co-authored-by: Kumar Aditya <[email protected]>
1 parent c77b0ce commit 9532c04

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Lib/asyncio/base_events.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,12 +1815,9 @@ def call_exception_handler(self, context):
18151815
exc_info=True)
18161816

18171817
def _add_callback(self, handle):
1818-
"""Add a Handle to _scheduled (TimerHandle) or _ready."""
1819-
assert isinstance(handle, events.Handle), 'A Handle is required here'
1820-
if handle._cancelled:
1821-
return
1822-
assert not isinstance(handle, events.TimerHandle)
1823-
self._ready.append(handle)
1818+
"""Add a Handle to _ready."""
1819+
if not handle._cancelled:
1820+
self._ready.append(handle)
18241821

18251822
def _add_callback_signalsafe(self, handle):
18261823
"""Like _add_callback() but called from a signal handler."""
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Remove unused references to :class:`~asyncio.TimerHandle` in
2+
``asyncio.base_events.BaseEventLoop._add_callback``.

0 commit comments

Comments
 (0)