This is an automated email from the ASF dual-hosted git repository.

ephraimbuddy pushed a commit to branch dag-processor-http-manager
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit f0ee14124b21638ff41f51354e240249964d34bd
Author: Ephraim Anierobi <[email protected]>
AuthorDate: Wed Oct 14 13:30:32 2026 +0100

    Ban new httpx imports in airflow-core
    
    The Dag processor API client kept catching httpx exceptions after the Task 
SDK
    client moved to httpx2, and nothing at lint time flagged the mismatch. With
    httpx banned, the next mix-up is a ruff error instead of failing tests; the
    modules not yet migrated are exempt until apache/airflow#70522 moves them.
---
 airflow-core/pyproject.toml | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/airflow-core/pyproject.toml b/airflow-core/pyproject.toml
index fa9cd83c586..521b523744b 100644
--- a/airflow-core/pyproject.toml
+++ b/airflow-core/pyproject.toml
@@ -103,8 +103,9 @@ dependencies = [
     # parsed with no field-count or field-size bound at all.
     "starlette>=1.3.1",
     "httpx>=0.25.0",
-    # Only for InProcessExecutionAPI's transports, which feed httpx2-based 
Task SDK clients.
-    # The rest of airflow-core is still on httpx; tracked at 
https://github.com/apache/airflow/issues/70522
+    # Only for code that talks to the httpx2-based Task SDK client: 
InProcessExecutionAPI's transports
+    # and the Dag processor's API client. The rest of airflow-core is still on 
httpx; tracked at
+    # https://github.com/apache/airflow/issues/70522
     "httpx2>=2.0.0",
     'importlib_metadata>=6.5;python_version<"3.12"',
     'importlib_metadata>=7.0;python_version>="3.12"',
@@ -332,6 +333,21 @@ required-version = ">=0.11.8"
 apache-airflow-core = {workspace = true}
 apache-airflow-devel-common = { workspace = true }
 
+[tool.ruff]
+extend = "../pyproject.toml"
+
+# Not yet migrated to httpx2; tracked at 
https://github.com/apache/airflow/issues/70522
+[tool.ruff.lint.extend-per-file-ignores]
+"src/airflow/api/client/local_client.py" = ["TID251"]
+"src/airflow/api_fastapi/auth/tokens.py" = ["TID251"]
+"src/airflow/example_dags/example_dag_decorator.py" = ["TID251"]
+"tests/unit/api_fastapi/auth/test_tokens.py" = ["TID251"]
+"tests/unit/api_fastapi/core_api/routes/public/test_dag_sources.py" = 
["TID251"]
+"tests/unit/api_fastapi/execution_api/versions/head/test_hitl.py" = ["TID251"]
+
+[tool.ruff.lint.flake8-tidy-imports.extend-banned-api]
+"httpx".msg = "Use httpx2; httpx objects do not interoperate with the 
httpx2-based Task SDK client. See 
https://github.com/apache/airflow/issues/70522";
+
 [tool.airflow]
 shared_distributions = [
     "apache-airflow-shared-configuration",

Reply via email to