8000 Reflect 'context' arg in 'AbstractEventLoop.call_*()' methods (GH-304… · python/cpython@0aa8bbf · GitHub
[go: up one dir, main page]

Skip to content

Commit 0aa8bbf

Browse files
Reflect 'context' arg in 'AbstractEventLoop.call_*()' methods (GH-30427) (#30429)
(cherry picked from commit 3e43fac) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
1 parent 64199e9 commit 0aa8bbf

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Lib/asyncio/events.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,13 @@ def _timer_handle_cancelled(self, handle):
258258
"""Notification that a TimerHandle has been cancelled."""
259259
raise NotImplementedError
260260

261-
def call_soon(self, callback, *args):
261+
def call_soon(self, callback, *args, context=None):
262262
return self.call_later(0, callback, *args)
263263

264-
def call_later(self, delay, callback, *args):
264+
def call_later(self, delay, callback, *args, context=None):
265265
raise NotImplementedError
266266

267-
def call_at(self, when, callback, *args):
267+
def call_at(self, when, callback, *args, cotext=None):
268268
raise NotImplementedError
269269

270270
def time(self):
@@ -280,7 +280,7 @@ def create_task(self, coro, *, name=None):
280280

281281
# Methods for interacting with threads.
282282

283-
def call_soon_threadsafe(self, callback, *args):
283+
def call_soon_threadsafe(self, callback, *args, context=None):
284284
raise NotImplementedError
285285

286286
def run_in_executor(self, executor, func, *args):
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Reflect ``context`` argument in ``AbstractEventLoop.call_*()`` methods. Loop
2+
implementations already support it.

0 commit comments

Comments
 (0)
0