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={