From e1668f6555f903a4c48bb7369ae5da282bcfbb61 Mon Sep 17 00:00:00 2001 From: markcheney Date: Tue, 18 Aug 2026 13:46:31 +0800 Subject: [PATCH] fix: support websockets 16 --- lark_oapi/ws/tests/test_websockets_compat.py | 2 +- setup.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lark_oapi/ws/tests/test_websockets_compat.py b/lark_oapi/ws/tests/test_websockets_compat.py index 538d1ee94..d455fe98e 100644 --- a/lark_oapi/ws/tests/test_websockets_compat.py +++ b/lark_oapi/ws/tests/test_websockets_compat.py @@ -83,7 +83,7 @@ def fake_post(url, *, headers=None, json=None): @pytest.mark.asyncio -async def test_connect_disables_websockets_15_automatic_proxy(monkeypatch): +async def test_connect_disables_websockets_15_and_16_automatic_proxy(monkeypatch): captured = {} async def fake_connect(uri, *, proxy=True): diff --git a/setup.py b/setup.py index 6b0deabd3..189293782 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,9 @@ "requests>=2.25", "requests_toolbelt>=0.9", "pycryptodome>=3.9", - "websockets>=11,<16", + # websockets 16 requires Python >=3.10; pip selects an older compatible + # release when installing the SDK on Python 3.8 or 3.9. + "websockets>=11,<17", "httpx>=0.24,<1.0", ], extras_require={