Visitar URL original
fix: tarfile extraction filter by henryiii 路 Pull Request #2856 路 pypa/cibuildwheel 路 GitHub
Skip to content

fix: tarfile extraction filter - #2856

Merged
henryiii merged 3 commits into
pypa:mainfrom
henryiii:henryiii/fix/extract
May 17, 2026
Merged

henryiii merged 3 commits into
pypa:mainfrom
henryiii:henryiii/fix/extract

Conversation

@henryiii

Copy link
Copy Markdown
Contributor

From pypa/build, with pathlib improvements and adapted for 3.11+. See #2854.

From pypa/build, with pathlib improvements and adapted for 3.11+. See pypa#2854.

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>

@agriyakhetarpal agriyakhetarpal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @henryiii! One cleanup below, and one more thing I'd suggest adding is your note about how this is adapted from pypa/build. This is a utility file and by no means a substantial portion, so I don't think we have to reproduce the copyright notice verbatim (too excessive), but we should still add the attribution by mentioning it as a code comment at the top that can be something like:

# Based on https://github.com/pypa/build/blob/f4ebd495cc0c2c74155bd4fe48b76399fb7927ac/src/build/_compat/tarfile.py
# SPDX-License-Identifier: MIT

or whatever you think is nicer, so that we can remember beyond the PR where we got this from.

Comment thread cibuildwheel/_compat/tarfile.py Outdated
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
@henryiii

henryiii commented May 15, 2026 •

Copy link
Copy Markdown
Contributor Author

@layday is the original author (along with edits from me and maybe @gaborbernat), so I think if we got permission would be easier than adding a license (BSD-2-clause and MIT).

Add header comment indicating source of the file.
@layday

layday commented May 16, 2026

Copy link
Copy Markdown
Member

I don't remember which part of this I authored, but you have my permission to use it in cibuildwheel without attribution.

@henryiii
henryiii merged commit d08d9ac into pypa:main May 17, 2026
73 of 74 checks passed
@henryiii
henryiii deleted the henryiii/fix/extract branch May 17, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants