Compare commits
No commits in common. "paulo-raca/python3.10" and "master" have entirely different histories.
paulo-raca
...
master
5 changed files with 8 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
__version__ = "0.0.19"
|
||||
__version__ = "0.0.18"
|
||||
__author__ = "Jack Robison"
|
||||
__maintainer__ = "Jack Robison"
|
||||
__license__ = "MIT"
|
||||
|
|
|
@ -224,7 +224,7 @@ class Gateway:
|
|||
try:
|
||||
return await asyncio.wait_for(loop.create_task(
|
||||
cls._discover_gateway(lan_address, gateway_address, timeout, loop)
|
||||
), timeout)
|
||||
), timeout, loop=loop)
|
||||
except asyncio.TimeoutError:
|
||||
raise UPnPError(f"M-SEARCH for {gateway_address}:1900 timed out")
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ async def scpd_get(control_url: str, address: str, port: int,
|
|||
assert isinstance(protocol, SCPDHTTPClientProtocol)
|
||||
|
||||
error = None
|
||||
wait_task: typing.Awaitable[typing.Tuple[bytes, bytes, int, bytes]] = asyncio.wait_for(protocol.finished, 1.0)
|
||||
wait_task: typing.Awaitable[typing.Tuple[bytes, bytes, int, bytes]] = asyncio.wait_for(protocol.finished, 1.0, loop=loop)
|
||||
body = b''
|
||||
raw_response = b''
|
||||
try:
|
||||
|
@ -182,7 +182,7 @@ async def scpd_post(control_url: str, address: str, port: int, method: str, para
|
|||
assert isinstance(protocol, SCPDHTTPClientProtocol)
|
||||
|
||||
try:
|
||||
wait_task: typing.Awaitable[typing.Tuple[bytes, bytes, int, bytes]] = asyncio.wait_for(finished, 1.0)
|
||||
wait_task: typing.Awaitable[typing.Tuple[bytes, bytes, int, bytes]] = asyncio.wait_for(finished, 1.0, loop=loop)
|
||||
raw_response, body, response_code, response_msg = await wait_task
|
||||
except asyncio.TimeoutError:
|
||||
return {}, b'', UPnPError("Timeout")
|
||||
|
|
|
@ -31,8 +31,8 @@ class SSDPProtocol(MulticastProtocol):
|
|||
self.transport: Optional[DatagramTransport] = None
|
||||
self._pending_searches: List[PendingSearch] = []
|
||||
self.notifications: List[SSDPDatagram] = []
|
||||
self.connected = asyncio.Event()
|
||||
self.devices: 'asyncio.Queue[SSDPDatagram]' = asyncio.Queue()
|
||||
self.connected = asyncio.Event(loop=self.loop)
|
||||
self.devices: 'asyncio.Queue[SSDPDatagram]' = asyncio.Queue(loop=self.loop)
|
||||
|
||||
def connection_made(self, transport: asyncio.DatagramTransport) -> None: # type: ignore
|
||||
super().connection_made(transport)
|
||||
|
@ -98,7 +98,7 @@ class SSDPProtocol(MulticastProtocol):
|
|||
async def m_search(self, address: str, timeout: float,
|
||||
datagrams: List[Dict[str, typing.Union[str, int]]]) -> SSDPDatagram:
|
||||
fut = self.send_m_searches(address, datagrams)
|
||||
return await asyncio.wait_for(fut, timeout)
|
||||
return await asyncio.wait_for(fut, timeout, loop=self.loop)
|
||||
|
||||
def datagram_received(self, data: bytes, addr: Tuple[str, int]) -> None: # type: ignore
|
||||
if addr[0] == self.bind_address:
|
||||
|
|
4
setup.py
4
setup.py
|
@ -24,10 +24,8 @@ setup(
|
|||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Topic :: System :: Networking",
|
||||
"Topic :: Communications :: File Sharing"
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue