Skip to content

Commit 3e43fac

Browse files
authored
Reflect 'context' arg in 'AbstractEventLoop.call_*()' methods (GH-30427)
1 parent 3db762d commit 3e43fac

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Lib/asyncio/events.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,13 @@ def _timer_handle_cancelled(self, handle):
257257
"""Notification that a TimerHandle has been cancelled."""
258258
raise NotImplementedError
259259

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

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

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

269269
def time(self):
@@ -279,7 +279,7 @@ def create_task(self, coro, *, name=None):
279279

280280
# Methods for interacting with threads.
281281

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

285285
def run_in_executor(self, executor, func, *args):
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)