Tests for grafted_library_problem, the check that a recipe's library was linked statically
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- testing-qa
調査の方向性
scripts/gap_wheels.py の grafted_library_problem() から始めます。これはトップレベルのフォルダが .libs で終わるメンバーをすべてフラグし、tests/test_gap_wheels.py の既存の bundled_licence_problem テストと併せて、それらのインメモリ zipfile スタイルをコピーします。リストされたケースを追加します。.libs フォルダがない場合は None、トップレベルの .libs フォルダは理由を返し、トップレベルの notes.libs ファイルとネストされた yaml/vendor.libs フォルダは None、zip でないバイトは読み取れなかった理由を返し、空の zip は None を返します。uvx --python 3.14 [email protected] を実行して main で合格することを確認し、次に 1 行の変異を適用して元に戻し、2 つのテストが失敗することを示します。
索引モデルが issue の本文から書いたものです。
説明
grafted_library_problem() in scripts/gap_wheels.py (added with library recipes, #33) is one of the checks between a built wheel and publication. A recipe's library must be linked into the extension statically. If the build instead picked up a shared copy from somewhere else, auditwheel bundles it into a <dist>.libs/ folder, and that copy didn't come from the recipe's checked source. The function reads the wheel's member names and returns a reason when it finds such a folder:
grafted = any("/" in n and n.partition("/")[0].endswith(".libs") for n in z.namelist())
...
return "bundles a shared library in a .libs folder; a recipe's library must be linked in statically" if grafted else None
cmd_stage() calls it for every wheel built with a recipe: reason = bundled_licence_problem(data, recipes) or grafted_library_problem(data).
Nothing tests it. git grep grafted_library_problem finds the definition and that one call. A slip in a later edit (say endswith(".libs") becoming == ".libs") would let a wheel with an unreviewed shared library through staging with every test green.
What to do
Add tests to tests/test_gap_wheels.py, next to the tests for bundled_licence_problem. Build each wheel in memory with zipfile (empty files are enough; other tests there show how):
- a wheel with no
.libsfolder:None; PyYAML.libs/libyaml-0.so.2: the reason;pyyaml.libs/x.soandpkg_name.libs/sub/y.so.1: the reason (any top-level folder ending in.libs);- a top-level file named
notes.libs(no/):None; - a nested folder
yaml/vendor.libs/x.so:None, since only a top-level folder is where auditwheel grafts (pin today's behaviour, and say in the PR if you think it's wrong); - bytes that aren't a zip: the reason
couldn't read its members, not an exception; - an empty zip:
None.
And one test through cmd_stage()'s path if the existing staging tests make that easy (tests/test_build_tool_lock.py patches take_wheel for one): a recipe wheel with a .libs folder isn't staged, and its summary line carries the reason.
Tests only: scripts/ stays as it is. If a case shows a real bug, report it in the PR and leave the fix to a maintainer.
Done when:
- The cases above are in
tests/test_gap_wheels.pyand pass onmain. - In the PR description, give two one-line changes to
grafted_library_problem()that each make a test fail (each applied, run and reverted). uvx --python 3.14 [email protected]passes, offline. No new dependencies.
- 主要言語
- Python
- スター
- 0
- フォーク
- 1
- 平均マージ
- 5時間 59分
- マージ済み PR(30日)
- 19
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
wheelgap/wheels のほかの issue
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
bug help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
bug help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
wheelgap/wheels の issue をすべて見る
似ている issue
-
bug docs
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ActivityWatch/docs#223 ·
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier capture対応中かも @jianyx1 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
volcengine/OpenViking#8354 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ARTPARK-SAHAI-ORG/calibrate-frontend#842 ·
メンテナーはふだん 1 日以内に返信
-
comp/tools P2 tool/skills type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#159541 ·
メンテナーはふだん 1 日以内に返信