Skip to content

Commit 99da75e

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 <nick@koston.org> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
1 parent c6cfde6 commit 99da75e

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
@@ -1828,12 +1828,9 @@ def call_exception_handler(self, context):
18281828
exc_info=True)
18291829

18301830
def _add_callback(self, handle):
1831-
"""Add a Handle to _scheduled (TimerHandle) or _ready."""
1832-
assert isinstance(handle, events.Handle), 'A Handle is required here'
1833-
if handle._cancelled:
1834-
return
1835-
assert not isinstance(handle, events.TimerHandle)
1836-
self._ready.append(handle)
1831+
"""Add a Handle to _ready."""
1832+
if not handle._cancelled:
1833+
self._ready.append(handle)
18371834

18381835
def _add_callback_signalsafe(self, handle):
18391836
"""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)