Skip to content

Commit

Permalink
do not pass loop at all in Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed May 31, 2022
1 parent 6223b9f commit f4880d0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions adaptive/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,11 +641,8 @@ async def _run(self):
try:
while not self.goal(self.learner):
futures = self._get_futures()
done, _ = await asyncio.wait(
futures,
return_when=first_completed,
loop=self.ioloop if sys.version_info[:2] < (3, 10) else None,
)
kw = {"loop": self.ioloop} if sys.version_info[:2] < (3, 10) else {}
done, _ = await asyncio.wait(futures, return_when=first_completed, **kw)
self._process_futures(done)
finally:
remaining = self._remove_unfinished()
Expand Down

0 comments on commit f4880d0

Please sign in to comment.