[gentoo-commits] repo/gentoo:master commit in: dev-python/uvicorn/files/, dev-python/uvicorn/
commit: 300e20ddab67230cc4a6d06e457a9cc22658a66a Author: Michał Górny gentoo org> AuthorDate: Tue Dec 26 10:41:16 2023 + Commit: Michał Górny gentoo org> CommitDate: Tue Dec 26 10:50:22 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=300e20dd dev-python/uvicorn: Bump to 0.25.0 Signed-off-by: Michał Górny gentoo.org> dev-python/uvicorn/Manifest| 1 + dev-python/uvicorn/files/uvicorn-0.25.0-test.patch | 46 + dev-python/uvicorn/uvicorn-0.25.0.ebuild | 77 ++ 3 files changed, 124 insertions(+) diff --git a/dev-python/uvicorn/Manifest b/dev-python/uvicorn/Manifest index 025f5112a687..80b466c9ff71 100644 --- a/dev-python/uvicorn/Manifest +++ b/dev-python/uvicorn/Manifest @@ -1 +1,2 @@ DIST uvicorn-0.24.0.gh.tar.gz 715220 BLAKE2B b71273545ae244544b5336524bf4ad1f386c8bb2b1addc501514833f37376f8a09a1d4dfc2272c3b62555337a20750af827c9a7a4c3bffc6327a9d1809869cfa SHA512 98b58ce17a1f072f36923b1b616f818cbadd091256ce1281a5236268ba2378d212384d9c3390b5903edfda5c692a67935051379e31732df45422595a88c69232 +DIST uvicorn-0.25.0.gh.tar.gz 717386 BLAKE2B f0a472676a732d7807137f157c95574584d882bf9ae8531c4e2c1164ebe9eec2172da62f72f07032ada422b7932f221457686aa22ab6fbceac57685ad91920b8 SHA512 19c1e6438c40ab1b1d30c9c9c84d65f2dc661197adcc6be3d7825223d933d4554ec388323e16452ef0409476766af1ae18bb3252a391099bd2e2bfe2b6c4abb2 diff --git a/dev-python/uvicorn/files/uvicorn-0.25.0-test.patch b/dev-python/uvicorn/files/uvicorn-0.25.0-test.patch new file mode 100644 index ..8cd1cc7bb8c4 --- /dev/null +++ b/dev-python/uvicorn/files/uvicorn-0.25.0-test.patch @@ -0,0 +1,46 @@ +From 64013e8729afc93880a749974491ab5a90b29deb Mon Sep 17 00:00:00 2001 +From: Marcelo Trylesinski +Date: Tue, 26 Dec 2023 10:28:55 +0100 +Subject: [PATCH] Allow test suite to run without httptools installed + +--- + tests/protocols/test_http.py | 19 +++ + 1 file changed, 7 insertions(+), 12 deletions(-) + +diff --git a/tests/protocols/test_http.py b/tests/protocols/test_http.py +index fde4cc70b..ca06b33a6 100644 +--- a/tests/protocols/test_http.py b/tests/protocols/test_http.py +@@ -994,25 +994,20 @@ async def test_huge_headers_h11_max_incomplete(): + + + @pytest.mark.anyio +-@pytest.mark.parametrize( +-"protocol_cls,close_header", +-( +-pytest.param( +-HttpToolsProtocol, b"connection: close", marks=skip_if_no_httptools +-), +-(H11Protocol, b"Connection: close"), +-), +-) +-async def test_return_close_header(protocol_cls, close_header: bytes): ++async def test_return_close_header( ++http_protocol_cls: "Type[HttpToolsProtocol | H11Protocol]" ++): + app = Response("Hello, world", media_type="text/plain") + +-protocol = get_connected_protocol(app, protocol_cls) ++protocol = get_connected_protocol(app, http_protocol_cls) + protocol.data_received(CONNECTION_CLOSE_REQUEST) + await protocol.loop.run_one() + assert b"HTTP/1.1 200 OK" in protocol.transport.buffer + assert b"content-type: text/plain" in protocol.transport.buffer + assert b"content-length: 12" in protocol.transport.buffer +-assert close_header in protocol.transport.buffer ++# NOTE: We need to use `.lower()` because H11 implementation doesn't allow Uvicorn ++# to lowercase them. See: https://github.com/python-hyper/h11/issues/156 ++assert b"connection: close" in protocol.transport.buffer.lower() + + + @pytest.mark.anyio diff --git a/dev-python/uvicorn/uvicorn-0.25.0.ebuild b/dev-python/uvicorn/uvicorn-0.25.0.ebuild new file mode 100644 index ..a675be713124 --- /dev/null +++ b/dev-python/uvicorn/uvicorn-0.25.0.ebuild @@ -0,0 +1,77 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYTHON_COMPAT=( pypy3 python3_{10..12} ) + +inherit distutils-r1 optfeature + +DESCRIPTION="Lightning-fast ASGI server implementation" +HOMEPAGE=" + https://www.uvicorn.org/ + https://github.com/encode/uvicorn/ + https://pypi.org/project/uvicorn/ +" +# as of 0.21.0, no tests in sdist +SRC_URI=" + https://github.com/encode/uvicorn/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="test-rust" + +RDEPEND=" + >=dev-python/asgiref-3.4.0[${PYTHON_USEDEP}] + >=dev-python/click-7.0[${PYTHON_USEDEP}] + >=dev-python/h11-0.8[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/a2wsgi[${PYTHON_USEDEP}] + dev-python/httpx[${PYTHON_USEDEP}] + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/pytest-mock[${PYTHON_USEDEP}] + dev-python/python-dotenv[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}]
[gentoo-commits] repo/gentoo:master commit in: dev-python/uvicorn/files/, dev-python/uvicorn/
commit: 1bf48a0e40e5b897c802207afc9881f27ddffd25 Author: Michał Górny gentoo org> AuthorDate: Mon Jul 24 12:59:10 2023 + Commit: Michał Górny gentoo org> CommitDate: Mon Jul 24 12:59:10 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bf48a0e dev-python/uvicorn: Remove old Signed-off-by: Michał Górny gentoo.org> dev-python/uvicorn/Manifest| 2 - .../files/uvicorn-0.21.1-optional-rust.patch | 80 -- dev-python/uvicorn/uvicorn-0.20.0.ebuild | 72 dev-python/uvicorn/uvicorn-0.21.1-r1.ebuild| 96 -- 4 files changed, 250 deletions(-) diff --git a/dev-python/uvicorn/Manifest b/dev-python/uvicorn/Manifest index 69419035acb3..3171d6eec91b 100644 --- a/dev-python/uvicorn/Manifest +++ b/dev-python/uvicorn/Manifest @@ -1,4 +1,2 @@ -DIST uvicorn-0.20.0.gh.tar.gz 716073 BLAKE2B 7f1cf4808e985199d39e54e3563119cef1fe3af31361ad05a91278d32bc6f0dd741ad87f6073fbb720e9d9d4119fc8389b4e2feaaede665d8f68c56d56b37a17 SHA512 fa089da78dd7ce3cc02d83405e7db401e6055e947b80bf4abb0e3a4dce6575d97761f3bd6fcc253f3338caad5f797fc4f01bd40d833514d9cc0bcd0f072ad793 -DIST uvicorn-0.21.1.gh.tar.gz 717974 BLAKE2B ac4e1ec6a2533e364fe2ad7cd52558ad70b82e3c739756f33123d08737cc406ba879f50f7fa1cba875d0f0a284da5467e4ca15139558462401fb6a7938a17f61 SHA512 9f8dfe42df5d7f3923609e177def66d68fac24e3016fc1c6fead489320c2e5eaf7816a43e242f4426e670ce16f200db41679ac6ebd29a000ba76ca72b9ccec76 DIST uvicorn-0.22.0.gh.tar.gz 719615 BLAKE2B 8e0d6099e66822e77fb447c279de8f29c820e1f9e24e37629d36349ebd4b52ea8dc69f7fc02a21e9711925e3ad1ec4a95464ea315c7bc40a905810dc9a1ef077 SHA512 61af2df426a5bc060a32730ddf024ca8dd39ccea6800235bf48d7e0c694b9d363cbedd826f498063c6779061af84b6b56e8ab0a466e74291dbbaf5ae995e5587 DIST uvicorn-0.23.0.gh.tar.gz 722671 BLAKE2B f1fdc09e211c97d9e326b41b197d12ad019e660a1a2fcc0c70ee62c2016a20bbcafb9be759fc9b682185e70e10881c9a3511168eb0e75844973f7c3321d455bd SHA512 2449150abdf7914b47ff8c02732549cd71e63cc7c6440eedfd200340df4e70543232ed1ef47e2ebc6b29fc9a0d4615f542d7d1c603ce2673f121afab63d89b47 diff --git a/dev-python/uvicorn/files/uvicorn-0.21.1-optional-rust.patch b/dev-python/uvicorn/files/uvicorn-0.21.1-optional-rust.patch deleted file mode 100644 index dddeda158252.. --- a/dev-python/uvicorn/files/uvicorn-0.21.1-optional-rust.patch +++ /dev/null @@ -1,80 +0,0 @@ a/tests/conftest.py -+++ b/tests/conftest.py -@@ -11,9 +11,13 @@ from time import sleep - from uuid import uuid4 - - import pytest --import trustme --from cryptography.hazmat.backends import default_backend --from cryptography.hazmat.primitives import serialization -+ -+try: -+import trustme -+from cryptography.hazmat.backends import default_backend -+from cryptography.hazmat.primitives import serialization -+except ImportError: -+pass - - from uvicorn.config import LOGGING_CONFIG - -@@ -30,12 +34,12 @@ LOGGING_CONFIG["loggers"]["uvicorn"]["propagate"] = True - - - @pytest.fixture --def tls_certificate_authority() -> trustme.CA: -+def tls_certificate_authority() -> "trustme.CA": - return trustme.CA() - - - @pytest.fixture --def tls_certificate(tls_certificate_authority: trustme.CA) -> trustme.LeafCert: -+def tls_certificate(tls_certificate_authority: "trustme.CA") -> "trustme.LeafCert": - return tls_certificate_authority.issue_cert( - "localhost", - "127.0.0.1", -@@ -44,13 +48,13 @@ def tls_certificate(tls_certificate_authority: trustme.CA) -> trustme.LeafCert: - - - @pytest.fixture --def tls_ca_certificate_pem_path(tls_certificate_authority: trustme.CA): -+def tls_ca_certificate_pem_path(tls_certificate_authority: "trustme.CA"): - with tls_certificate_authority.cert_pem.tempfile() as ca_cert_pem: - yield ca_cert_pem - - - @pytest.fixture --def tls_ca_certificate_private_key_path(tls_certificate_authority: trustme.CA): -+def tls_ca_certificate_private_key_path(tls_certificate_authority: "trustme.CA"): - with tls_certificate_authority.private_key_pem.tempfile() as private_key: - yield private_key - -@@ -72,25 +76,25 @@ def tls_certificate_private_key_encrypted_path(tls_certificate): - - - @pytest.fixture --def tls_certificate_private_key_path(tls_certificate: trustme.CA): -+def tls_certificate_private_key_path(tls_certificate: "trustme.CA"): - with tls_certificate.private_key_pem.tempfile() as private_key: - yield private_key - - - @pytest.fixture --def tls_certificate_key_and_chain_path(tls_certificate: trustme.LeafCert): -+def tls_certificate_key_and_chain_path(tls_certificate: "trustme.LeafCert"): - with tls_certificate.private_key_and_cert_chain_pem.tempfile() as cert_pem: - yield cert_pem - - - @pytest.fixture --def tls_certificate_server_cert_path(tls_certificate: trustme.LeafCert): -+def tls_certificate_server_cert_path(tls_certificate: "trustme.LeafCert"): - with
[gentoo-commits] repo/gentoo:master commit in: dev-python/uvicorn/files/
commit: 12923d672c0285744ae3cf1f47e955581be1c214 Author: Sam James gentoo org> AuthorDate: Wed Apr 12 03:47:09 2023 + Commit: Sam James gentoo org> CommitDate: Wed Apr 12 03:47:09 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12923d67 dev-python/uvicorn: improve optional Rust test deps patch Followup to 5de4c34f3962d77d3cb9a53a5d50c5ff75bdd2fa, thanks to mgorny for the suggestion. This lets us make it much smaller. Signed-off-by: Sam James gentoo.org> .../files/uvicorn-0.21.1-optional-rust.patch | 152 ++--- 1 file changed, 44 insertions(+), 108 deletions(-) diff --git a/dev-python/uvicorn/files/uvicorn-0.21.1-optional-rust.patch b/dev-python/uvicorn/files/uvicorn-0.21.1-optional-rust.patch index 405eb5325ad9..dddeda158252 100644 --- a/dev-python/uvicorn/files/uvicorn-0.21.1-optional-rust.patch +++ b/dev-python/uvicorn/files/uvicorn-0.21.1-optional-rust.patch @@ -1,6 +1,6 @@ --- a/tests/conftest.py +++ b/tests/conftest.py -@@ -11,9 +11,15 @@ from time import sleep +@@ -11,9 +11,13 @@ from time import sleep from uuid import uuid4 import pytest @@ -8,137 +8,73 @@ -from cryptography.hazmat.backends import default_backend -from cryptography.hazmat.primitives import serialization + -+gentoo_got_rust_deps = True -+ +try: +import trustme +from cryptography.hazmat.backends import default_backend +from cryptography.hazmat.primitives import serialization +except ImportError: -+gentoo_got_rust_deps = False ++pass from uvicorn.config import LOGGING_CONFIG -@@ -28,72 +34,72 @@ from uvicorn.config import LOGGING_CONFIG - # See also: https://github.com/pytest-dev/pytest/issues/3697 - LOGGING_CONFIG["loggers"]["uvicorn"]["propagate"] = True +@@ -30,12 +34,12 @@ LOGGING_CONFIG["loggers"]["uvicorn"]["propagate"] = True + -- --@pytest.fixture + @pytest.fixture -def tls_certificate_authority() -> trustme.CA: --return trustme.CA() -+if gentoo_got_rust_deps: -+@pytest.fixture -+def tls_certificate_authority() -> trustme.CA: -+return trustme.CA() ++def tls_certificate_authority() -> "trustme.CA": + return trustme.CA() --@pytest.fixture + @pytest.fixture -def tls_certificate(tls_certificate_authority: trustme.CA) -> trustme.LeafCert: --return tls_certificate_authority.issue_cert( --"localhost", --"127.0.0.1", --"::1", --) -+@pytest.fixture -+def tls_certificate(tls_certificate_authority: trustme.CA) -> trustme.LeafCert: -+return tls_certificate_authority.issue_cert( -+"localhost", -+"127.0.0.1", -+"::1", -+) - - --@pytest.fixture ++def tls_certificate(tls_certificate_authority: "trustme.CA") -> "trustme.LeafCert": + return tls_certificate_authority.issue_cert( + "localhost", + "127.0.0.1", +@@ -44,13 +48,13 @@ def tls_certificate(tls_certificate_authority: trustme.CA) -> trustme.LeafCert: + + + @pytest.fixture -def tls_ca_certificate_pem_path(tls_certificate_authority: trustme.CA): --with tls_certificate_authority.cert_pem.tempfile() as ca_cert_pem: --yield ca_cert_pem -+@pytest.fixture -+def tls_ca_certificate_pem_path(tls_certificate_authority: trustme.CA): -+with tls_certificate_authority.cert_pem.tempfile() as ca_cert_pem: -+yield ca_cert_pem ++def tls_ca_certificate_pem_path(tls_certificate_authority: "trustme.CA"): + with tls_certificate_authority.cert_pem.tempfile() as ca_cert_pem: + yield ca_cert_pem --@pytest.fixture + @pytest.fixture -def tls_ca_certificate_private_key_path(tls_certificate_authority: trustme.CA): --with tls_certificate_authority.private_key_pem.tempfile() as private_key: --yield private_key -+@pytest.fixture -+def tls_ca_certificate_private_key_path(tls_certificate_authority: trustme.CA): -+with tls_certificate_authority.private_key_pem.tempfile() as private_key: -+yield private_key - - --@pytest.fixture --def tls_certificate_private_key_encrypted_path(tls_certificate): --private_key = serialization.load_pem_private_key( --tls_certificate.private_key_pem.bytes(), --password=None, --backend=default_backend(), --) --encrypted_key = private_key.private_bytes( --serialization.Encoding.PEM, --serialization.PrivateFormat.TraditionalOpenSSL, --serialization.BestAvailableEncryption(b"uvicorn password for the win"), --) --with trustme.Blob(encrypted_key).tempfile() as private_encrypted_key: --yield private_encrypted_key -+@pytest.fixture -+def tls_certificate_private_key_encrypted_path(tls_certificate): -+private_key = serialization.load_pem_private_key( -+tls_certificate.private_key_pem.bytes(), -+password=None, -+backend=default_backend(), -+) -+encrypted_key = private_key.private_bytes(
[gentoo-commits] repo/gentoo:master commit in: dev-python/uvicorn/files/, dev-python/uvicorn/
commit: b13b83861adfe8853690b0275abad901ba2242d1 Author: Sam James gentoo org> AuthorDate: Wed Apr 12 03:21:59 2023 + Commit: Sam James gentoo org> CommitDate: Wed Apr 12 03:21:59 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b13b8386 dev-python/uvicorn: make rust test dependencies optional Bug: https://bugs.gentoo.org/904191 Signed-off-by: Sam James gentoo.org> .../files/uvicorn-0.21.1-optional-rust.patch | 144 + dev-python/uvicorn/uvicorn-0.21.1.ebuild | 23 +++- 2 files changed, 164 insertions(+), 3 deletions(-) diff --git a/dev-python/uvicorn/files/uvicorn-0.21.1-optional-rust.patch b/dev-python/uvicorn/files/uvicorn-0.21.1-optional-rust.patch new file mode 100644 index ..405eb5325ad9 --- /dev/null +++ b/dev-python/uvicorn/files/uvicorn-0.21.1-optional-rust.patch @@ -0,0 +1,144 @@ +--- a/tests/conftest.py b/tests/conftest.py +@@ -11,9 +11,15 @@ from time import sleep + from uuid import uuid4 + + import pytest +-import trustme +-from cryptography.hazmat.backends import default_backend +-from cryptography.hazmat.primitives import serialization ++ ++gentoo_got_rust_deps = True ++ ++try: ++import trustme ++from cryptography.hazmat.backends import default_backend ++from cryptography.hazmat.primitives import serialization ++except ImportError: ++gentoo_got_rust_deps = False + + from uvicorn.config import LOGGING_CONFIG + +@@ -28,72 +34,72 @@ from uvicorn.config import LOGGING_CONFIG + # See also: https://github.com/pytest-dev/pytest/issues/3697 + LOGGING_CONFIG["loggers"]["uvicorn"]["propagate"] = True + +- +-@pytest.fixture +-def tls_certificate_authority() -> trustme.CA: +-return trustme.CA() ++if gentoo_got_rust_deps: ++@pytest.fixture ++def tls_certificate_authority() -> trustme.CA: ++return trustme.CA() + + +-@pytest.fixture +-def tls_certificate(tls_certificate_authority: trustme.CA) -> trustme.LeafCert: +-return tls_certificate_authority.issue_cert( +-"localhost", +-"127.0.0.1", +-"::1", +-) ++@pytest.fixture ++def tls_certificate(tls_certificate_authority: trustme.CA) -> trustme.LeafCert: ++return tls_certificate_authority.issue_cert( ++"localhost", ++"127.0.0.1", ++"::1", ++) + + +-@pytest.fixture +-def tls_ca_certificate_pem_path(tls_certificate_authority: trustme.CA): +-with tls_certificate_authority.cert_pem.tempfile() as ca_cert_pem: +-yield ca_cert_pem ++@pytest.fixture ++def tls_ca_certificate_pem_path(tls_certificate_authority: trustme.CA): ++with tls_certificate_authority.cert_pem.tempfile() as ca_cert_pem: ++yield ca_cert_pem + + +-@pytest.fixture +-def tls_ca_certificate_private_key_path(tls_certificate_authority: trustme.CA): +-with tls_certificate_authority.private_key_pem.tempfile() as private_key: +-yield private_key ++@pytest.fixture ++def tls_ca_certificate_private_key_path(tls_certificate_authority: trustme.CA): ++with tls_certificate_authority.private_key_pem.tempfile() as private_key: ++yield private_key + + +-@pytest.fixture +-def tls_certificate_private_key_encrypted_path(tls_certificate): +-private_key = serialization.load_pem_private_key( +-tls_certificate.private_key_pem.bytes(), +-password=None, +-backend=default_backend(), +-) +-encrypted_key = private_key.private_bytes( +-serialization.Encoding.PEM, +-serialization.PrivateFormat.TraditionalOpenSSL, +-serialization.BestAvailableEncryption(b"uvicorn password for the win"), +-) +-with trustme.Blob(encrypted_key).tempfile() as private_encrypted_key: +-yield private_encrypted_key ++@pytest.fixture ++def tls_certificate_private_key_encrypted_path(tls_certificate): ++private_key = serialization.load_pem_private_key( ++tls_certificate.private_key_pem.bytes(), ++password=None, ++backend=default_backend(), ++) ++encrypted_key = private_key.private_bytes( ++serialization.Encoding.PEM, ++serialization.PrivateFormat.TraditionalOpenSSL, ++serialization.BestAvailableEncryption(b"uvicorn password for the win"), ++) ++with trustme.Blob(encrypted_key).tempfile() as private_encrypted_key: ++yield private_encrypted_key + + +-@pytest.fixture +-def tls_certificate_private_key_path(tls_certificate: trustme.CA): +-with tls_certificate.private_key_pem.tempfile() as private_key: +-yield private_key ++@pytest.fixture ++def tls_certificate_private_key_path(tls_certificate: trustme.CA): ++with tls_certificate.private_key_pem.tempfile() as private_key: ++yield private_key + + +-@pytest.fixture +-def tls_certificate_key_and_chain_path(tls_certificate: trustme.LeafCert): +-
[gentoo-commits] repo/gentoo:master commit in: dev-python/uvicorn/files/
commit: 527566f337f939d0efd25e5775aa72fae339fcea Author: Michael Mair-Keimberger levelnine at> AuthorDate: Mon Oct 18 17:25:15 2021 + Commit: Conrad Kostecki gentoo org> CommitDate: Fri Oct 29 21:40:45 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=527566f3 dev-python/uvicorn: remove unused patch(es) Closes: https://github.com/gentoo/gentoo/pull/22625 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Michael Mair-Keimberger levelnine.at> Signed-off-by: Conrad Kostecki gentoo.org> .../files/uvicorn-0.13.4-fix-wsproto-1.0.patch | 31 -- 1 file changed, 31 deletions(-) diff --git a/dev-python/uvicorn/files/uvicorn-0.13.4-fix-wsproto-1.0.patch b/dev-python/uvicorn/files/uvicorn-0.13.4-fix-wsproto-1.0.patch deleted file mode 100644 index da3038d6db4..000 --- a/dev-python/uvicorn/files/uvicorn-0.13.4-fix-wsproto-1.0.patch +++ /dev/null @@ -1,31 +0,0 @@ -https://github.com/encode/uvicorn/pull/892 - -diff --git a/tests/protocols/test_http.py b/tests/protocols/test_http.py -index f35a965d..25110fc6 100644 a/tests/protocols/test_http.py -+++ b/tests/protocols/test_http.py -@@ -67,6 +67,7 @@ - b"Host: example.org", - b"Connection: upgrade", - b"Upgrade: websocket", -+b"Sec-WebSocket-Version: 11", - b"", - b"", - ] -diff --git a/tests/protocols/test_websocket.py b/tests/protocols/test_websocket.py -index 24bc285f..7c3fcc08 100644 a/tests/protocols/test_websocket.py -+++ b/tests/protocols/test_websocket.py -@@ -51,7 +51,11 @@ def app(scope): - async with httpx.AsyncClient() as client: - response = await client.get( - "http://127.0.0.1:8000;, --headers={"upgrade": "websocket", "connection": "upgrade"}, -+headers={ -+"upgrade": "websocket", -+"connection": "upgrade", -+"sec-webSocket-version": "11", -+}, - timeout=5, - ) - if response.status_code == 426: