Data test: check each gap wheel's requires_python against a late patch release (X.Y.99) too

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

メンテナーはふだん 1 日以内に返信

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

評価

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

調査の方向性

tests/test_data.py の target_python()、excluding_clause()、requires_python_error() から始めてください。これらは validation_errors() が呼び出します。test_mutations_are_rejected_with_the_wheel_named を読んで、既存の X.Y.0 ケースが維持すべきメッセージ形式を確認してください。requires_python_error() に X.Y.99 での2つ目のチェックを追加し、列挙された mutation ケースと passing ケースを追加してください。新しいケースが wheel と除外バージョン名を伴って失敗し、uvx --python 3.14 [email protected] がオフラインで通れば完了です。

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

説明

good first issue

Since #30 tests/test_data.py checks that every entry's requires_python admits the Python its wheel was built for. It compares against X.Y.0 only (target_python() returns (3, 14, 0) for 3.14 musl-aarch64). That is how pip treats a pre-release of a new Python, and it's the right first check.

It misses a value that admits X.Y.0 and leaves out later patch releases:

<3.14.1      admits 3.14.0, excludes 3.14.1 and every later 3.14
!=3.14.10    admits 3.14.0, excludes the 3.14.10 the wheel was built and tested on
==3.14.0     the same

An entry like that passes the test today. The wheel would show "in the index" on the page and in-index in status.json, and pip and uv on a current 3.14 would skip it without a word. wheelgap --fix would send people to it as well. Found in the review of #35.

Where

tests/test_data.py: target_python(), excluding_clause() and requires_python_error(), called from validation_errors().

What to do

  • In requires_python_error(), check the target's Python twice: as X.Y.0 (as now) and as X.Y.99, a patch release later than any real one. If either is excluded, report it, naming the version that failed: <wheel>: requires_python <3.14.1 excludes Python 3.14.99, a later patch release of its target.
  • Keep the existing message for X.Y.0 word for word, so the mutation cases that are there still match.
  • Add mutation cases to test_mutations_are_rejected_with_the_wheel_named: <3.14.1, !=3.14.99, ==3.14.0 and ~=3.14.0,<3.14.5 on a 3.14 target. Add cases that must still pass: >=3.10, <4,>=3.9, ==3.14.* and ~=3.14.0.

Tests only. If a real entry fails, list it in the PR and leave data/ and scripts/ as they are. Withdrawing a wheel is a maintainer's call.

Done when:

  • test_real_wheel_index_is_well_formed passes on main's data, or the PR lists each entry that fails.
  • The new mutation cases each fail with the wheel named and the version that was excluded.
  • In the PR description, give the one-line change to your code that makes one new case pass wrongly (for example: check X.Y.1 in place of X.Y.99).
  • uvx --python 3.14 [email protected] passes, offline. No new dependencies.
主要言語
Python
スター
0
フォーク
1
平均マージ
5時間 59分
マージ済み PR(30日)
19

環境構築

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

はじめの一歩

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

wheelgap/wheels のほかの issue

wheelgap/wheels の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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