Skip to content

starlette 1.6 deprecates httpx in TestClient, which every test uses #302

Description

@gaurav

Pinning fastapi~=0.141.1 in #294 brought in starlette 1.6.0, which emits on every test run:

StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated;
install `httpx2` instead.

The whole test suite goes through fastapi.testclient.TestClient, so this is one warning today and
a broken suite whenever starlette drops the httpx path. requirements.txt lists httpx
unpinned — the API itself uses it to talk to Solr, so a move to httpx2 is not only a test-side
change.

Worth deciding deliberately rather than discovering at the next bump:

  • Which starlette release actually removes the httpx support, and does httpx2 reach the same
    Solr client code we use in api/server.py?
  • Whether to migrate, or pin httpx and take the warning until then.

No behaviour is wrong today; the suite passes.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions