Skip to content

Commit

Permalink
Reflect 'context' arg in 'AbstractEventLoop.call_*()' methods (GH-30427)
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov authored Jan 6, 2022
1 parent 3db762d commit 3e43fac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib/asyncio/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,13 @@ def _timer_handle_cancelled(self, handle):
"""Notification that a TimerHandle has been cancelled."""
raise NotImplementedError

def call_soon(self, callback, *args):
def call_soon(self, callback, *args, context=None):
return self.call_later(0, callback, *args)

def call_later(self, delay, callback, *args):
def call_later(self, delay, callback, *args, context=None):
raise NotImplementedError

def call_at(self, when, callback, *args):
def call_at(self, when, callback, *args, cotext=None):
raise NotImplementedError

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

# Methods for interacting with threads.

def call_soon_threadsafe(self, callback, *args):
def call_soon_threadsafe(self, callback, *args, context=None):
raise NotImplementedError

def run_in_executor(self, executor, func, *args):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Reflect ``context`` argument in ``AbstractEventLoop.call_*()`` methods. Loop
implementations already support it.

0 comments on commit 3e43fac

Please sign in to comment.