IPv6 node addresses produce an invalid request URL
関連するプルリクエストがすでにマージされています。
- #155 @RaphaelFakhri による — マージ済み
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- backend, networking
調査の方向性
まず Node.url() と Node.from_url() を読みます。issue では、どちらも IPv6 の角括弧が失われる、または省略される箇所として挙げられています。提示された URL と node dict の例で問題を再現し、その後、ノード URL の構築に関するクライアントのテストを確認します。両方の設定で http://[::1]:8108 が生成され、リクエストが httpx.InvalidURL で失敗しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
A node with an IPv6 address can't be reached. Node.url() joins the host and port as {host}:{port} without enclosing an IPv6 literal in brackets, so every request fails with httpx.InvalidURL before it is sent.
Both ways of configuring a node are affected:
- A URL string such as
"http://[::1]:8108".Node.from_urltakes the host fromurlparse(url).hostname, which strips the brackets, so the host is stored as::1. - A node dict such as
{"host": "::1", "port": 8108, "protocol": "http"}.
Steps to reproduce
import typesense
client = typesense.Client({
"api_key": "xyz",
"nodes": ["http://[::1]:8108"],
"num_retries": 0,
})
print(client.api_call.node_manager.nodes[0].url())
client.operations.is_healthy()
Actual behavior
http://::1:8108
httpx.InvalidURL: Invalid port: ':1:8108'
Expected behavior
The client sends requests to http://[::1]:8108.
Environment
- typesense-python:
master(8727d2b) - httpx 0.28.1
- 主要言語
- Python
- スター
- 247
- フォーク
- 66
- 平均マージ
- 22時間 47分
- マージ済み PR(30日)
- 8
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
typesense/typesense-python のほかの issue
-
`MultiSearchResponse` type does not account for union search response shape対応中かも @tharropoulos が 172 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
typesense/typesense-python#128 ·
-
`documents.Documents.import_()` `batch_size` argument is ignored, type of `import_parameters` is missing `batch_size`対応中かも @tharropoulos が 245 日前に担当しました。 オープン
難易度 2/5 1〜2日 初心者へのやさしさ 68/100
typesense/typesense-python#124 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
typesense/typesense-python#100 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
typesense/typesense-python#122 · コメント 3 件 ·
-
[Bug] - DeprecationWarning on instantiation of Client対応中かも @tharropoulos が 266 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
typesense/typesense-python#114 · コメント 8 件 ·
typesense/typesense-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
aws-samples/sample-per-model-bedrock#464 ·
メンテナーはふだん 1 日以内に返信
-
lesson-submission pending-review
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
Ikalus1988/MisakaNet#3789 ·
メンテナーはふだん 1 日以内に返信
-
Python Volcengine provider returns failures instead of raising them対応中かも @Ricardo-M-L が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
agent-infra/sandbox#248 ·
-
[Bug] cloud JSON directory loading assumes a Key field in fsspec listings対応中かも @Ricardo-M-L が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
hiyouga/LlamaFactory#10910 ·
メンテナーはふだん 1 日以内に返信
-
Bundled uv is never updated and trusts the compromised eMudhra certificates対応中かも @FabienDanieau が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100