Skip to content

Commit 3247e21

Browse files
committed
do not pass loop at all in Python 3.10
1 parent abad155 commit 3247e21

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

adaptive/runner.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -641,11 +641,8 @@ async def _run(self):
641641
try:
642642
while not self.goal(self.learner):
643643
futures = self._get_futures()
644-
done, _ = await asyncio.wait(
645-
futures,
646-
return_when=first_completed,
647-
loop=self.ioloop if sys.version_info[:2] < (3, 10) else None,
648-
)
644+
kw = {"loop": self.ioloop} if sys.version_info[:2] < (3, 10) else {}
645+
done, _ = await asyncio.wait(futures, return_when=first_completed, **kw)
649646
self._process_futures(done)
650647
finally:
651648
remaining = self._remove_unfinished()

0 commit comments

Comments
 (0)