Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-133005: Supporttarfile.open(mode="w|xz", preset=...)#133007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gpshead merged 4 commits intopython:mainfrommgorny:tarfile-stream-xz-preset-133005
Apr 27, 2025

Conversation

mgorny
Copy link
Contributor

@mgornymgorny commentedApr 26, 2025
edited by github-actionsbot
Loading

Support passing thepreset option totarfile.open when the file is open withmode="w|xz". This aligns the behavior with"w:xz" mode.


📚 Documentation preview 📚:https://cpython-previews--133007.org.readthedocs.build/

gpshead reacted with thumbs up emoji
Support passing the `preset` option to `tarfile.open` when the fileis open with `mode="w|xz"`.  This aligns the behavior with `"w:xz"`mode.
@mgornymgornyforce-pushed thetarfile-stream-xz-preset-133005 branch from697bbca toebf37b6CompareApril 26, 2025 12:49
Raise an error if `compresslevel` or `preset` argument is specifiedfor stream mode with incorrect compression. This should reduce the riskof mistakes and align the stream modes with regular modes, that raisean implicit TypeError on unsupported arguments.
@mgorny
Copy link
ContributorAuthor

I've added raising an exception ifcompresslevel orpreset are specified for wrong compression as a second commit, since it's non-critical to the issue at hand, so it can be easily removed if you don't like it.

@mgorny
Copy link
ContributorAuthor

The macOS failures don't seem related.

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
@mgorny
Copy link
ContributorAuthor

Thank you for your suggestions!

Copy link
Member

@gpsheadgpshead left a comment

Choose a reason for hiding this comment

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

if the silently ignored when irrelevant compresslevel= that now raises causes an issue during the beta period we can revisit that error addition. (the error codepath will be adjusted with zstd support landing soon as well)

@gpsheadgpsheadenabled auto-merge (squash)April 27, 2025 21:12
@gpsheadgpshead merged commit019ee49 intopython:mainApr 27, 2025
39 checks passed
@mgornymgorny deleted the tarfile-stream-xz-preset-133005 branchApril 28, 2025 02:08
@mgorny
Copy link
ContributorAuthor

Thank you! It was also my logic that it's better to add the error while we're still in alpha.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@brianschubertbrianschubertbrianschubert left review comments

@gpsheadgpsheadgpshead approved these changes

@ethanfurmanethanfurmanAwaiting requested review from ethanfurmanethanfurman is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mgorny@gpshead@brianschubert

[8]ページ先頭

©2009-2025 Movatter.jp