mirror of
https://github.com/python/cpython.git
synced 2025-10-07 23:51:16 +00:00
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>
This commit is contained in:
parent
c22a55c8b4
commit
9e947675ae
2 changed files with 5 additions and 6 deletions
|
@ -1857,11 +1857,8 @@ class BaseEventLoop(events.AbstractEventLoop):
|
||||||
exc_info=True)
|
exc_info=True)
|
||||||
|
|
||||||
def _add_callback(self, handle):
|
def _add_callback(self, handle):
|
||||||
"""Add a Handle to _scheduled (TimerHandle) or _ready."""
|
"""Add a Handle to _ready."""
|
||||||
assert isinstance(handle, events.Handle), 'A Handle is required here'
|
if not handle._cancelled:
|
||||||
if handle._cancelled:
|
|
||||||
return
|
|
||||||
assert not isinstance(handle, events.TimerHandle)
|
|
||||||
self._ready.append(handle)
|
self._ready.append(handle)
|
||||||
|
|
||||||
def _add_callback_signalsafe(self, handle):
|
def _add_callback_signalsafe(self, handle):
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Remove unused references to :class:`~asyncio.TimerHandle` in
|
||||||
|
``asyncio.base_events.BaseEventLoop._add_callback``.
|
Loading…
Add table
Add a link
Reference in a new issue