gh-101143: Remove references to TimerHandle from asyncio.base_events.BaseEventLoop._add_callback (GH-101197)

(cherry picked from commit 9e947675ae)

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2023-01-21 03:25:22 -08:00 committed by GitHub
parent c77b0ce186
commit 9532c04151
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View file

@ -1815,12 +1815,9 @@ def call_exception_handler(self, context):
exc_info=True)
def _add_callback(self, handle):
"""Add a Handle to _scheduled (TimerHandle) or _ready."""
assert isinstance(handle, events.Handle), 'A Handle is required here'
if handle._cancelled:
return
assert not isinstance(handle, events.TimerHandle)
self._ready.append(handle)
"""Add a Handle to _ready."""
if not handle._cancelled:
self._ready.append(handle)
def _add_callback_signalsafe(self, handle):
"""Like _add_callback() but called from a signal handler."""

View file

@ -0,0 +1,2 @@
Remove unused references to :class:`~asyncio.TimerHandle` in
``asyncio.base_events.BaseEventLoop._add_callback``.