Failure to execute on Python 3.10: loop parameter was removed from asyncio.wait_for #29

Open
opened 2022-07-18 08:38:12 +02:00 by paulo-raca · 1 comment
paulo-raca commented 2022-07-18 08:38:12 +02:00 (Migrated from github.com)
$ aioupnp get_external_ip
Task exception was never retrieved
future: <Task finished name='Task-2' coro=<Gateway._discover_gateway() done, defined at /media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/gateway.py:197> exception=UPnPError(TypeError('As of 3.10, the *loop* parameter was removed from Event() since it is no longer necessary'))>
Traceback (most recent call last):
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 141, in listen_ssdp
    listen_result: Tuple[asyncio.BaseTransport, asyncio.BaseProtocol] = await loop.create_datagram_endpoint(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1373, in create_datagram_endpoint
    protocol = protocol_factory()
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 142, in <lambda>
    lambda: SSDPProtocol(SSDP_IP_ADDRESS, lan_address), sock=sock
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 34, in __init__
    self.connected = asyncio.Event(loop=self.loop)
  File "/usr/lib/python3.10/asyncio/locks.py", line 168, in __init__
    super().__init__(loop=loop)
  File "/usr/lib/python3.10/asyncio/mixins.py", line 17, in __init__
    raise TypeError(
TypeError: As of 3.10, the *loop* parameter was removed from Event() since it is no longer necessary

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/gateway.py", line 201, in _discover_gateway
    ssdp_proto = await multi_m_search(
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 171, in multi_m_search
    protocol, gateway_address, lan_address = await listen_ssdp(
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 147, in listen_ssdp
    raise UPnPError(err)
aioupnp.fault.UPnPError: As of 3.10, the *loop* parameter was removed from Event() since it is no longer necessary
Traceback (most recent call last):
  File "/media/Paulo/home//.local/bin/aioupnp", line 8, in <module>
    sys.exit(main())
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/__main__.py", line 117, in main
    run_cli(
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/upnp.py", line 434, in run_cli
    loop.run_until_complete(wrapper())
  File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/upnp.py", line 410, in wrapper
    u = await UPnP.discover(
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/upnp.py", line 56, in discover
    gateway = await Gateway.discover_gateway(
  File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/gateway.py", line 225, in discover_gateway
    return await asyncio.wait_for(loop.create_task(
TypeError: wait_for() got an unexpected keyword argument 'loop'
``` $ aioupnp get_external_ip Task exception was never retrieved future: <Task finished name='Task-2' coro=<Gateway._discover_gateway() done, defined at /media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/gateway.py:197> exception=UPnPError(TypeError('As of 3.10, the *loop* parameter was removed from Event() since it is no longer necessary'))> Traceback (most recent call last): File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 141, in listen_ssdp listen_result: Tuple[asyncio.BaseTransport, asyncio.BaseProtocol] = await loop.create_datagram_endpoint( File "/usr/lib/python3.10/asyncio/base_events.py", line 1373, in create_datagram_endpoint protocol = protocol_factory() File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 142, in <lambda> lambda: SSDPProtocol(SSDP_IP_ADDRESS, lan_address), sock=sock File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 34, in __init__ self.connected = asyncio.Event(loop=self.loop) File "/usr/lib/python3.10/asyncio/locks.py", line 168, in __init__ super().__init__(loop=loop) File "/usr/lib/python3.10/asyncio/mixins.py", line 17, in __init__ raise TypeError( TypeError: As of 3.10, the *loop* parameter was removed from Event() since it is no longer necessary During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/gateway.py", line 201, in _discover_gateway ssdp_proto = await multi_m_search( File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 171, in multi_m_search protocol, gateway_address, lan_address = await listen_ssdp( File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/protocols/ssdp.py", line 147, in listen_ssdp raise UPnPError(err) aioupnp.fault.UPnPError: As of 3.10, the *loop* parameter was removed from Event() since it is no longer necessary Traceback (most recent call last): File "/media/Paulo/home//.local/bin/aioupnp", line 8, in <module> sys.exit(main()) File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/__main__.py", line 117, in main run_cli( File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/upnp.py", line 434, in run_cli loop.run_until_complete(wrapper()) File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete return future.result() File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/upnp.py", line 410, in wrapper u = await UPnP.discover( File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/upnp.py", line 56, in discover gateway = await Gateway.discover_gateway( File "/media/Paulo/home/.local/lib/python3.10/site-packages/aioupnp/gateway.py", line 225, in discover_gateway return await asyncio.wait_for(loop.create_task( TypeError: wait_for() got an unexpected keyword argument 'loop' ```
slk9 commented 2023-05-04 23:21:42 +02:00 (Migrated from github.com)

Any plans to fix python 3.10+ support?

Any plans to fix python 3.10+ support?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/aioupnp#29
No description provided.