starlette 1.6 deprecates httpx in TestClient, which every test uses

Aperta
#302 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
fastapi, python
Ambito
backend, testing

Direzione di ricerca

Start by checking the dependency versions in requirements.txt and how api/server.py uses httpx for Solr, then trace the tests' use of fastapi.testclient.TestClient. Check which Starlette release removes the httpx path and whether httpx2 supports the Solr client. Decide whether to migrate both uses or pin httpx; done means the suite runs without the deprecation warning or remains on a deliberate pin.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
5
Fork
4
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NCATSTranslator/NameResolution

Tutte le issue di NCATSTranslator/NameResolution

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.