Upgrade websockets dependency to 15.0.1+

This commit is contained in:
Josh Wu
2025-10-31 17:25:35 +08:00
parent 1982168a9f
commit d43f5573a6
12 changed files with 57 additions and 45 deletions

View File

@@ -22,6 +22,7 @@ import contextlib
import io
import logging
import struct
from collections.abc import Awaitable, Callable
from typing import Any, ContextManager, Optional, Protocol
from bumble import core, hci
@@ -389,15 +390,17 @@ class PumpedPacketSource(ParserSource):
# -----------------------------------------------------------------------------
class PumpedPacketSink:
def __init__(self, send):
pump_task: Optional[asyncio.Task[None]]
def __init__(self, send: Callable[[bytes], Awaitable[Any]]):
self.send_function = send
self.packet_queue = asyncio.Queue()
self.packet_queue = asyncio.Queue[bytes]()
self.pump_task = None
def on_packet(self, packet: bytes) -> None:
self.packet_queue.put_nowait(packet)
def start(self):
def start(self) -> None:
async def pump_packets():
while True:
try: