8000 gh-101143: Remove references to `TimerHandle` from `asyncio.base_even… · python/cpython@9e94767 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9e94767

Browse files
gh-101143: Remove references to TimerHandle from asyncio.base_events.BaseEventLoop._add_callback (#101197)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
1 parent c22a55c commit 9e94767

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
@@ -1857,12 +1857,9 @@ def call_exception_handler(self, context):
18571857
exc_info=True)
18581858

18591859
def _add_callback(self, handle):
1860-
"""Add a Handle to _scheduled (TimerHandle) or _ready."""
1861-
assert isinstance(handle, events.Handle), 'A Handle is required here'
1862-
if handle._cancelled:
1863-
return
1864-
assert not isinstance(handle, events.TimerHandle)
1865-
self._ready.append(handle)
1860+
"""Add a Handle to _ready."""
1861+
if not handle._cancelled:
1862+
self._ready.append(handle)
18661863

18671864
def _add_callback_signalsafe(self, handle):
18681865
"""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)
0