Skip to content

Commit

Permalink
Drop loop kwarg from asyncio.gather call
Browse files Browse the repository at this point in the history
On Python 3.10 gather does not accept the loop kwarg anymore:

>       res = await asyncio.gather(*requests, loop=loop, return_exceptions=True)
E       TypeError: gather() got an unexpected keyword argument 'loop'
  • Loading branch information
mweinelt committed May 26, 2022
1 parent c0378ef commit c5440fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pyfronius/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ async def fetch(
# storage is not necessarily supported by every fronius device
device_storage=frozenset(["0"]),
device_inverter=frozenset(["1"]),
loop=None,
):
requests = []
if active_device_info:
Expand All @@ -298,7 +297,7 @@ async def fetch(
for i in device_inverter:
requests.append(self.current_inverter_data(i))

res = await asyncio.gather(*requests, loop=loop, return_exceptions=True)
res = await asyncio.gather(*requests, return_exceptions=True)
responses = []
for result in res:
if isinstance(result, FroniusError):
Expand Down

0 comments on commit c5440fb

Please sign in to comment.