Bug 2483715

Summary: python-fastapi: FTBFS in Fedora Rawhide: starlette's update caused errors in fastapi testsuite.
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-fastapiAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, paul.wouters, rominf
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
URL: https://koschei.fedoraproject.org/package/python-fastapi
Whiteboard:
Fixed In Version: python-fastapi-0.136.3-4.fc45 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-06-01 13:29:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2412434, 2433833    

Description Karolina Surma 2026-06-01 10:09:18 UTC
Description of problem:
Package python-fastapi fails to build from source in Fedora Rawhide.

Version-Release number of selected component (if applicable):
0.136.3-3.fc45

Steps to Reproduce:
koji build --scratch f45 python-fastapi-0.136.3-3.fc45.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/python-fastapi

Reproducible: Always

Actual Results:
___________________ ERROR collecting tests/test_ws_router.py ___________________
/usr/lib/python3.14/site-packages/starlette/testclient.py:43: in <module>
    import httpx2 as httpx
E   ModuleNotFoundError: No module named 'httpx2'
During handling of the above exception, another exception occurred:
tests/test_ws_router.py:14: in <module>
    from fastapi.testclient import TestClient
fastapi/testclient.py:1: in <module>
    from starlette.testclient import TestClient as TestClient  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3.14/site-packages/starlette/testclient.py:54: in <module>
    warnings.warn(
E   starlette.exceptions.StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.

Comment 1 Ben Beasley 2026-06-01 13:03:16 UTC
Thanks for reporting this. FastAPI upstream has already dealt with this by installing httpx2 for testing, https://github.com/fastapi/fastapi/pull/15603. We will probably have to package httpx2 (a maintained fork of httpx by the Pydantic people) sooner rather than later, but I’d like to put it off as long as possible, ideally long enough that someone else does it 😉. For now, I’ll plan to add a comment and ignore this particular deprecation warning downstream instead.

Comment 2 Fedora Update System 2026-06-01 13:24:48 UTC
FEDORA-2026-2447174939 (python-fastapi-0.136.3-4.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-2447174939

Comment 3 Fedora Update System 2026-06-01 13:29:24 UTC
FEDORA-2026-2447174939 (python-fastapi-0.136.3-4.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.