Skip to content

Consider swapping httpx usage for httpx2 #70522

Description

@zach-overflow

Under which category would you file this issue?

Airflow Core

Apache Airflow version

3.x

What happened and how to reproduce it?

At the time of writing, it appears that the httpx library might not be actively maintained. There are a number of bug-fixes for httpx which have not landed, but which are present in httpx2 (forked from httpx==0.28.1).

Additionally, the maintainer of starlette (one of the key sub-dependencies of FastAPI) has confirmed that starlette will migrate to httpx2. So it seems the migration from httpx in FastAPI is an eventuality.

What you think should happen instead?

Any direct usage of httpx within airflow-core / the task-sdk / airflow's providers should probably migrate to httpx2.

The scope of this change is obviously large; but the migration of direct code reliance on httpx is relatively straightforward.

I'd imagine it would be good to add individual, well-defined / scoped sub-issues for this.

Work Tracking

The following subtasks need to be completed in order for this issue to be marked as closed:

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

potiuk commented on Jul 27, 2026

@potiuk
Member

I guess until starlette migrates, it makes little sense for us to keep both dependencies - so I would rather wait for them - maybe someone can open a PR doing the migration to test it and see if there are any compatibility issues - if you would like to do it - feel free.

added a commit that references this issue on Aug 5, 2026
bfb69f2

Kludex commented on Aug 15, 2026

@Kludex
Contributor

I've migrated Starlette.

zach-overflow commented on Aug 25, 2026

@zach-overflow
ContributorAuthor

I was curious to see if / how FastAPI was migrating to httpx2. Currently, it looks like there might be some work towards a gradual migration.

Given the split components of Airflow (core, sdk, providers), I think it might make sense to address each individually. My hunch is that this would be a good way to split out the migration:

  • airflow-core: Temporarily support both httpx and httpx2, with some tentative future release targetting the removal of httpx.
  • task-sdk: It looks like this may be able to fully cutover in a single release.
  • airflow-providers: Looking into this one currently, hoping to put up a PR for it if there aren't any unexpected issues.
added a commit that references this issue on Sep 4, 2026
4dadf0f

zach-overflow commented on Sep 15, 2026

@zach-overflow
ContributorAuthor

I've also followed up on the FastAPI discussion thread about the httpx → httpx2 migration here. I believe that discussion thread is the main place to follow any progress on the migration in FastAPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:dependenciesIssues related to dependencies problemskind:bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions