From 9cd8bd80f0f3088c2255670bab89e9ea3754087a Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Wed, 26 Jun 2024 19:41:58 -0300 Subject: [PATCH 1/4] Enable HTTP2 --- postgrest/_async/client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/postgrest/_async/client.py b/postgrest/_async/client.py index 089fa6b9..ea06eb6e 100644 --- a/postgrest/_async/client.py +++ b/postgrest/_async/client.py @@ -53,6 +53,7 @@ def create_session( timeout=timeout, verify=verify, follow_redirects=True, + http2=True, ) async def __aenter__(self) -> AsyncPostgrestClient: From 5ec00a1e4289ceb599b06a22d72684ccbba5549a Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Wed, 26 Jun 2024 19:42:03 -0300 Subject: [PATCH 2/4] Enable HTTP2 --- postgrest/_sync/client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/postgrest/_sync/client.py b/postgrest/_sync/client.py index 7bc568e9..24f68f77 100644 --- a/postgrest/_sync/client.py +++ b/postgrest/_sync/client.py @@ -53,6 +53,7 @@ def create_session( timeout=timeout, verify=verify, follow_redirects=True, + http2=True, ) def __enter__(self) -> SyncPostgrestClient: From 2a66381f9b4a7375f324d993c7654e4301520757 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Wed, 26 Jun 2024 19:42:08 -0300 Subject: [PATCH 3/4] Enable HTTP2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 854cd9be..df5217a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ packages = [ [tool.poetry.dependencies] python = "^3.8" -httpx = ">=0.24,<0.28" +httpx = {version = ">=0.24,<0.28", extras = ["http2"]} deprecation = "^2.1.0" pydantic = ">=1.9,<3.0" strenum = "^0.4.9" From 010e9b2b8658c9c89dfede19c391b66d8d752556 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Wed, 26 Jun 2024 19:46:32 -0300 Subject: [PATCH 4/4] Enable HTTP2 --- poetry.lock | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index 4c05de44..face575f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -529,6 +529,32 @@ files = [ {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, ] +[[package]] +name = "h2" +version = "4.1.0" +description = "HTTP/2 State-Machine based protocol implementation" +optional = false +python-versions = ">=3.6.1" +files = [ + {file = "h2-4.1.0-py3-none-any.whl", hash = "sha256:03a46bcf682256c95b5fd9e9a99c1323584c3eec6440d379b9903d709476bc6d"}, + {file = "h2-4.1.0.tar.gz", hash = "sha256:a83aca08fbe7aacb79fec788c9c0bac936343560ed9ec18b82a13a12c28d2abb"}, +] + +[package.dependencies] +hpack = ">=4.0,<5" +hyperframe = ">=6.0,<7" + +[[package]] +name = "hpack" +version = "4.0.0" +description = "Pure-Python HPACK header compression" +optional = false +python-versions = ">=3.6.1" +files = [ + {file = "hpack-4.0.0-py3-none-any.whl", hash = "sha256:84a076fad3dc9a9f8063ccb8041ef100867b1878b25ef0ee63847a5d53818a6c"}, + {file = "hpack-4.0.0.tar.gz", hash = "sha256:fc41de0c63e687ebffde81187a948221294896f6bdc0ae2312708df339430095"}, +] + [[package]] name = "httpcore" version = "1.0.4" @@ -564,6 +590,7 @@ files = [ [package.dependencies] anyio = "*" certifi = "*" +h2 = {version = ">=3,<5", optional = true, markers = "extra == \"http2\""} httpcore = "==1.*" idna = "*" sniffio = "*" @@ -574,6 +601,17 @@ cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] +[[package]] +name = "hyperframe" +version = "6.0.1" +description = "HTTP/2 framing layer for Python" +optional = false +python-versions = ">=3.6.1" +files = [ + {file = "hyperframe-6.0.1-py3-none-any.whl", hash = "sha256:0ec6bafd80d8ad2195c4f03aacba3a8265e57bc4cff261e802bf39970ed02a15"}, + {file = "hyperframe-6.0.1.tar.gz", hash = "sha256:ae510046231dc8e9ecb1a6586f63d2347bf4c8905914aa84ba585ae85f28a914"}, +] + [[package]] name = "identify" version = "2.5.35" @@ -1677,4 +1715,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "1976a6bfb2e7320715f92739635c8bbe844edcff578cb383620a0c8b8fb490da" +content-hash = "451ca298c3cebc4021b42dc0b55c3d58b58f95432c959c43282bb21992f162f7"