starlette 1.6 deprecates httpx in TestClient, which every test uses

オープン
#302 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
静か
技術スタック
fastapi, python
領域
backend, testing

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
5
フォーク
4
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NCATSTranslator/NameResolution のほかの issue

NCATSTranslator/NameResolution の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。