Skip to content

Commit 3fbbedb

Browse files
code review
1 parent e11a52a commit 3fbbedb

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

Lib/asyncio/staggered.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class _Done(Exception):
1212
pass
1313

14-
async def staggered_race(coro_fns, delay, *, loop=None):
14+
async def staggered_race(coro_fns, delay):
1515
"""Run coroutines with staggered start times and take the first to finish.
1616
1717
This method takes an iterable of coroutine functions. The first one is
@@ -65,15 +65,6 @@ async def staggered_race(coro_fns, delay, *, loop=None):
6565
winner_index = None
6666
exceptions = []
6767

68-
if loop is not None:
69-
import warnings
70-
warnings._deprecated(
71-
'loop',
72-
'the {name!r} parameter is deprecated and slated for removal in '
73-
'Python {remove}; it is ignored since 3.14',
74-
remove=(3, 16),
75-
)
76-
7768
async def run_one_coro(this_index, coro_fn, this_failed):
7869
try:
7970
result = await coro_fn()

Lib/test/test_asyncio/test_eager_task_factory.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,11 @@ async def run():
213213

214214
self.run_coro(run())
215215

216-
# See GH-124309 for both of these
217216
def test_staggered_race_with_eager_tasks(self):
217+
# See https://github.com/python/cpython/issues/124309
218+
218219
async def fail():
219-
await asyncio.sleep(0) # Dummy coroutine
220+
await asyncio.sleep(0)
220221
raise ValueError("no good")
221222

222223
async def run():
@@ -237,6 +238,7 @@ async def run():
237238
self.run_coro(run())
238239

239240
def test_staggered_race_with_eager_tasks_no_delay(self):
241+
# See https://github.com/python/cpython/issues/124309
240242
async def fail():
241243
raise ValueError("no good")
242244

0 commit comments

Comments
 (0)