GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.9] gh-102950: Implement PEP 706 – Filter for tarfile.extractall (GH-102953) by encukou · Pull Request #104382 · python/cpython

Conversation

@encukou

@encukou encukou commented May 11, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

See Backporting & Forward Compatibility in PEP 706.

  • Backport b52ad18
  • Backport c8c3956
  • Remove the DeprecationWarning
  • Remove new __all__ entries
  • Adjust docs
  • Issue: Implement PEP 706 – Filter for tarfile.extractall #102950

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
encukou added 5 commits May 11, 2023 11:24
@encukou
Implement PEP 706 – Filter for tarfile.extractall
f74c01f
@encukou
Remove the DeprecationWarning
2948293
@encukou
Remove new __all__ entries
0669095
@encukou
pythongh-102950: Adjust tarfile filter tests for systems that don't s…
da07840
…et the sticky bit (pythonGH-103831)

Also remove expilcit `type=tarfile.DIRTYPE`, the slash at the end is
enough.

Backport of c8c3956
@encukou
Adjust the docs for 3.9.17
a83ffd7
@encukou
encukou requested a review from ethanfurman as a code owner May 11, 2023 09:38
@bedevere-bot bedevere-bot added the awaiting core review label May 11, 2023
This was referenced May 11, 2023
Implement PEP 706 – Filter for tarfile.extractall #102950
Closed
gh-102950: Implement PEP 706 – Filter for tarfile.extractall #102953
Merged
@encukou
Skip chmod checking on Windows
2772bc6
@encukou encukou added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 11, 2023
@bedevere-bot

bedevere-bot commented May 11, 2023

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @encukou for commit 2772bc6 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 11, 2023
@encukou

encukou commented May 15, 2023

Copy link
Copy Markdown
Member Author

Buildbots are green except:

  • WASI & Windows-bigmem builders fail to build 3.9 at all
  • macOS fails on unrelated issue (idle)

@ambv Do you want PEP-706 backported to 3.9?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ambv

ambv commented May 15, 2023

Copy link
Copy Markdown
Contributor

@encukou if so, 3.8 is also still supported for security fixes. I'd lean +0 because it would:

  • 👍🏻 making the automated security checkers happy with those versions of Python; but
  • 👎🏻 most users of Python 3.9 won't be building and installing 3.9.17 anyway; and
  • 👎🏻 user code would have to employ a check for whether the filter functionality is available, and since this check will likely fail on 3.9 -- implement a workaround themselves anyway.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou

encukou commented May 15, 2023

Copy link
Copy Markdown
Member Author

implement a workaround themselves anyway.

The workaround is quite involved in this case, so one of the suggestions is:

if hasattr(tarfile, 'data_filter'):
    my_tarfile.extractall(filter='data')
else:
    # remove this when no longer needed
    warn_the_user('Extracting may be unsafe; consider updating Python')
    my_tarfile.extractall()

See the PEP's section on backporting: https://peps.python.org/pep-0706/#backporting-forward-compatibility

most users of Python 3.9 won't be building and installing 3.9.17 anyway

FWIW, in RHEL we'll probably need to backport regardless of your decision (and probably go with a more aggressive variant, to boot).
Having it upstream could make life easier for other redistributors.


And yes, if it goes in, 3.8 and 3.7 is next.
Again FWIW: Red Hat is likely to put it in 3.6 as well.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ambv

ambv commented May 15, 2023

Copy link
Copy Markdown
Contributor

@encukou if you're going to do it for Red Hat anyway, I will happily take it for 3.9 and 3.8. The window for 3.7 support closes in June and I'm sure @ned-deily would accept the filter for the last release of that, too.

encukou and ned-deily reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ambv
ambv merged commit 98016f7 into python:3.9 May 15, 2023
@bedevere-bot bedevere-bot removed the awaiting core review label May 15, 2023
@encukou
encukou deleted the tarfile-3.9 branch May 15, 2023 16:54
@jameslamb jameslamb mentioned this pull request Jan 7, 2026
[ci] ensure correct Python version is used in CI, fix compatibility with older pre-3.12 patch versions jameslamb/pydistcheck#355
Merged
This was referenced Aug 18, 2026
feat(ci): prove published release golden path Rul1an/assay#2513
Merged
feat(residency): reconcile fork with Lemonade v11.7.0 nisavid/lemonade#101
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ethanfurman ethanfurman Awaiting requested review from ethanfurman ethanfurman is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@encukou @bedevere-bot @ambv
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.