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-132983: Clean-ups for_zstd#133670

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
AA-Turner merged 16 commits intopython:mainfromAA-Turner:zstd-clean
May 9, 2025
Merged

Conversation

AA-Turner
Copy link
Member

@AA-TurnerAA-Turner commentedMay 8, 2025
edited by bedevere-appbot
Loading

cc@Rogdham (can't request review).

Best reviewed commit-by-commit.

This contains several clean-ups for the_zstd module.

  • _compressionLevel_values is replaced with a single int constant, the default compression level
  • zstd_version_info is initialised from the macros, removing version decomposition arithmetic
  • remove the unused_ZSTD_CStreamSizes
  • Replace_ZSTD_DStreamSizes withZSTD_DStreamOutSize
  • Remove unused_ZSTD_Config
  • Remove zstd version string from error messages -- it is inconsistently used, and the version can be found from the module-level variables
  • small refactoring ofset_zstd_error()
  • Inline theadd_parameters function and use the existingPyModule_AddIntMacro rather than defining a local equivalent
  • Remove the leading underscore from several constants in an already private module, use an explicit list of names for the re-exporting incompression.zstd

A

@Rogdham
Copy link
Contributor

Rogdham commentedMay 8, 2025
edited
Loading

I read through your commits and have no objections, but I don't feel confident enough to review this on my own.

Did you decide to leave functions of_zstd module with a leading underscore on purpose? (_train_dict/_finalize_dict/_get_param_bounds/_get_frame_info/_set_parameter_types) I have no opinion on it, I'm just curious.

@AA-Turner
Copy link
MemberAuthor

Good question -- this PR was getting too big, so I just submitted the changes to the module-level constants. I intend to go through the functions in a follow-up.

A

Rogdham and emmatyping reacted with thumbs up emoji

@AA-TurnerAA-Turnerenabled auto-merge (squash)May 8, 2025 18:16
@AA-TurnerAA-Turnerdisabled auto-mergeMay 8, 2025 19:20
emmatyping
emmatyping previously requested changesMay 8, 2025
Copy link
Member

@emmatypingemmatyping left a comment

Choose a reason for hiding this comment

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

I have one request but otherwise I think these changes look like great clean ups. Thanks!

@AA-TurnerAA-Turner merged commitc2a5d4b intopython:mainMay 9, 2025
42 checks passed
@miss-islington-app
Copy link

Thanks@AA-Turner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@AA-TurnerAA-Turner deleted the zstd-clean branchMay 9, 2025 14:08
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 9, 2025
(cherry picked from commitc2a5d4b)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@bedevere-app
Copy link

GH-133756 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelMay 9, 2025
AA-Turner added a commit that referenced this pull requestMay 9, 2025
gh-132983: Clean-ups for ``_zstd`` (GH-133670)(cherry picked from commitc2a5d4b)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@RogdhamRogdhamRogdham left review comments

@picnixzpicnixzpicnixz approved these changes

@emmatypingemmatypingemmatyping left review comments

@serhiy-storchakaserhiy-storchakaAwaiting requested review from serhiy-storchaka

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

Successfully merging this pull request may close these issues.

5 participants
@AA-Turner@Rogdham@serhiy-storchaka@emmatyping@picnixz

[8]ページ先頭

©2009-2025 Movatter.jp