@@ -124,7 +124,7 @@ keywords to your callback, use :func:`functools.partial`. For example,
124124 parameters in debug mode, whereas ``lambda `` functions have a poor
125125 representation.
126126
127- .. method :: AbstractEventLoop.call_soon(callback, \ *args)
127+ .. method :: AbstractEventLoop.call_soon(callback, *args, context=None )
128128
129129 Arrange for a callback to be called as soon as possible. The callback is
130130 called after :meth: `call_soon ` returns, when control returns to the event
@@ -137,19 +137,31 @@ keywords to your callback, use :func:`functools.partial`. For example,
137137 Any positional arguments after the callback will be passed to the
138138 callback when it is called.
139139
140+ An optional keyword-only *context * argument allows specifying a custom
141+ :class: `contextvars.Context ` for the *callback * to run in. The current
142+ context is used when no *context * is provided.
143+
140144 An instance of :class: `asyncio.Handle ` is returned, which can be
141145 used to cancel the callback.
142146
143147 :ref: `Use functools.partial to pass keywords to the callback
144148 <asyncio-pass-keywords>`.
145149
146- .. method :: AbstractEventLoop.call_soon_threadsafe(callback, \*args)
150+ .. versionchanged :: 3.7
151+ The *context * keyword-only parameter was added. See :pep: `567 `
152+ for more details.
153+
154+ .. method :: AbstractEventLoop.call_soon_threadsafe(callback, *args, context=None)
147155
148156 Like :meth: `call_soon `, but thread safe.
149157
150158 See the :ref: `concurrency and multithreading <asyncio-multithreading >`
151159 section of the documentation.
152160
161+ .. versionchanged :: 3.7
162+ The *context * keyword-only parameter was added. See :pep: `567 `
163+ for more details.
164+
153165
154166.. _asyncio-delayed-calls :
155167
@@ -166,7 +178,7 @@ a different clock than :func:`time.time`.
166178 Timeouts (relative *delay * or absolute *when *) should not exceed one day.
167179
168180
169- .. method :: AbstractEventLoop.call_later(delay, callback, *args)
181+ .. method :: AbstractEventLoop.call_later(delay, callback, *args, context=None )
170182
171183 Arrange for the *callback * to be called after the given *delay *
172184 seconds (either an int or float).
@@ -182,10 +194,18 @@ a different clock than :func:`time.time`.
182194 is called. If you want the callback to be called with some named
183195 arguments, use a closure or :func: `functools.partial `.
184196
197+ An optional keyword-only *context * argument allows specifying a custom
198+ :class: `contextvars.Context ` for the *callback * to run in. The current
199+ context is used when no *context * is provided.
200+
185201 :ref: `Use functools.partial to pass keywords to the callback
186202 <asyncio-pass-keywords>`.
187203
188- .. method :: AbstractEventLoop.call_at(when, callback, *args)
204+ .. versionchanged :: 3.7
205+ The *context * keyword-only parameter was added. See :pep: `567 `
206+ for more details.
207+
208+ .. method :: AbstractEventLoop.call_at(when, callback, *args, context=None)
189209
190210 Arrange for the *callback * to be called at the given absolute timestamp
191211 *when * (an int or float), using the same time reference as
@@ -199,6 +219,10 @@ a different clock than :func:`time.time`.
199219 :ref: `Use functools.partial to pass keywords to the callback
200220 <asyncio-pass-keywords>`.
201221
222+ .. versionchanged :: 3.7
223+ The *context * keyword-only parameter was added. See :pep: `567 `
224+ for more details.
225+
202226.. method :: AbstractEventLoop.time()
203227
204228 Return the current time, as a :class: `float ` value, according to the
0 commit comments