Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Unchecked multi-value query parameters are sent as a single tuple string

オープン 初心者向け
#123 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@sylvesterkaczmarek がすでに取り組んでいます。

2026年9月26日 から。

  • #125 @sylvesterkaczmarek による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
api

調査の方向性

Query.parameters と _build_url から始め、関連するシーケンス動作について VariableQuery.instance_format を調べます。解析済みの URL と準備済みの Requests を使用して回帰ケースとコントロールケースを実行し、その後 VCR record_mode='none' で完全な 148 テストスイートを実行します。タプル値に対するクエリキーの繰り返しが機能し、既存のリスト、スカラー、ページネーション、専用メソッドの動作が引き続きパスすれば完了です。

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

説明

Reproduction

On develop at 9f7648ccb925b9c0eb50241e35f15d6454e89505, the unchecked multi-value path in Query.parameters stores a tuple under a key ending in [], but _build_url only expands lists.

from cmr import CollectionQuery

query = CollectionQuery().parameters(data_center=["FIRST", "SECOND"])
print(query._build_url())

The query string is data_center[]=('FIRST', 'SECOND'). It should be data_center[]=FIRST&data_center[]=SECOND. Singleton and empty iterables are also serialized as tuple representations. The same base-class behavior affects every query type and reaches requests made by results, get, and hits.

VariableQuery.instance_format also accepts sequences, but a tuple argument has the same problem without the existing array suffix.

Expected behavior

Expand both list and tuple parameter values into repeated query keys, without adding a second [] to keys that already have one. Keep the existing stored parameter representation, dedicated-method tuple unpacking, scalar handling, and pagination behavior.

Nineteen new regression/control cases use parsed URLs and real Requests prepared requests with only the transport replaced. Seventeen fail on unchanged code, while the existing list/scalar controls pass. The focused fix passes all 148 tests, with existing VCR cassettes replayed in record_mode='none' so no live CMR requests are made.

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

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

nasa/python_cmr のほかの issue

nasa/python_cmr の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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