[rh:websockets] Upgrade websockets to 13.0 (#10815)
Fixes CI hanging Authored by: coletdjnz
This commit is contained in:
parent
f0bb28504c
commit
6f9e653743
5 changed files with 8 additions and 9 deletions
|
|
@ -47,10 +47,7 @@ from websockets.uri import parse_uri
|
|||
# 2: "AttributeError: 'ClientConnection' object has no attribute 'recv_events_exc'. Did you mean: 'recv_events'?"
|
||||
import websockets.sync.connection # isort: split
|
||||
with contextlib.suppress(Exception):
|
||||
# > 12.0
|
||||
websockets.sync.connection.Connection.recv_exc = None
|
||||
# 12.0
|
||||
websockets.sync.connection.Connection.recv_events_exc = None
|
||||
|
||||
|
||||
class WebsocketsResponseAdapter(WebSocketResponse):
|
||||
|
|
@ -162,7 +159,7 @@ class WebsocketsRH(WebSocketRequestHandler):
|
|||
additional_headers=headers,
|
||||
open_timeout=timeout,
|
||||
user_agent_header=None,
|
||||
ssl_context=ssl_ctx if wsuri.secure else None,
|
||||
ssl=ssl_ctx if wsuri.secure else None,
|
||||
close_timeout=0, # not ideal, but prevents yt-dlp hanging
|
||||
)
|
||||
return WebsocketsResponseAdapter(conn, url=request.url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue