python / python/cpython

zipapp disregards filter when checking if target overwrites source

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

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

3.13 3.14 stdlib type-bug
主要言語
Python
スター
77.2k
フォーク
36k
PR マージ指標
PR 指標を取得中

説明

Bug report

Bug description:

A check was recently added (https://github.com/python/cpython/pull/130509) to ensure that the target of a zipapp.create_archive() call does not overwrite any of its source files. However, this check does not consider the filter parameter of create_archive and this results in false positives.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs
  • gh-132934

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

zipapp.create_archive から調査を始め、target-overwrites-source のチェックが filter パラメーターをどのように扱っているかを確認してください。報告で説明されている false positive を再現し、その後、フィルターで除外されたソースファイルではチェックが発生しなくなる一方で、実際の上書きでは引き続き発生することを検証してください。リンクされている PR gh-132934 は、すでに作業が進められていることを示しています。

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

評価

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

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

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