python / python/cpython

zipapp disregards filter when checking if target overwrites source

Open
#132,933 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.13 3.14 stdlib type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at zipapp.create_archive and inspect how the target-overwrites-source check handles the filter parameter. Reproduce the false positive described in the report, then verify that filtered-out source files no longer trigger the check while genuine overwrites still do; linked PR gh-132934 indicates work is already underway.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.