From 1a5de589f619762be3db6dfdb50bbd08e84f8160 Mon Sep 17 00:00:00 2001 From: Tim Paine <3105306+timkpaine@users.noreply.github.com> Date: Fri, 28 Aug 2026 10:16:44 -0400 Subject: [PATCH] Migrate from httpx to httpx2 Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com> --- conda/dev-environment-unix.yml | 2 +- conda/dev-environment-win.yml | 2 +- csp/tests/adapters/kafka_utils.py | 6 +++--- pyproject.toml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/conda/dev-environment-unix.yml b/conda/dev-environment-unix.yml index e060c6bce..533b856ac 100644 --- a/conda/dev-environment-unix.yml +++ b/conda/dev-environment-unix.yml @@ -17,7 +17,7 @@ dependencies: - flex - graphviz - gtest - - httpx>=0.20,<1 + - httpx2>=2,<3 - libarrow<24 - libboost>=1.80.0 - libboost-headers>=1.80.0 diff --git a/conda/dev-environment-win.yml b/conda/dev-environment-win.yml index 12391e9d2..533da6a27 100644 --- a/conda/dev-environment-win.yml +++ b/conda/dev-environment-win.yml @@ -17,7 +17,7 @@ dependencies: # - flex # not available on windows - graphviz - gtest - - httpx>=0.20,<1 + - httpx2>=2,<3 - libarrow<24 - libboost>=1.80.0 - libboost-headers>=1.80.0 diff --git a/csp/tests/adapters/kafka_utils.py b/csp/tests/adapters/kafka_utils.py index 98544cd34..ce9c5383e 100644 --- a/csp/tests/adapters/kafka_utils.py +++ b/csp/tests/adapters/kafka_utils.py @@ -1,12 +1,12 @@ -import httpx +import httpx2 def _precreate_topic(topic): """Since we test against confluent kafka, just use the kafka rest addon""" rest_broker = "http://localhost:8082" - cluster_info = httpx.get(f"{rest_broker}/v3/clusters") + cluster_info = httpx2.get(f"{rest_broker}/v3/clusters") cluster_id = cluster_info.json()["data"][0]["cluster_id"] - resp = httpx.post(f"{rest_broker}/v3/clusters/{cluster_id}/topics", json={"topic_name": topic}) + resp = httpx2.post(f"{rest_broker}/v3/clusters/{cluster_id}/topics", json={"topic_name": topic}) if resp.status_code != 201 and "already exists" not in resp.content.decode("utf8"): raise Exception( f"Could not create topic {topic} on cluster {rest_broker}/v3/clusters/{cluster_id}/topics - received {resp.content}" diff --git a/pyproject.toml b/pyproject.toml index 1793b3825..ba779bf0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ develop = [ "graphviz", "pillow", # adapters - "httpx>=0.20,<1", # kafka + "httpx2>=2,<3", # kafka "perspective-python>=2", # perspective "anywidget", # perspective "polars", # parquet @@ -102,7 +102,7 @@ test = [ "pytest-asyncio", "pytest-cov", "pytest-sugar", - "httpx>=0.20,<1", + "httpx2>=2,<3", "perspective-python", "polars", "psutil",