Skip to content

gh-132983: Convert zstd __new__ methods to Argument Clinic - #133860

Merged
AA-Turner merged 9 commits into
python:mainfrom
AA-Turner:zstd-ac-new
May 12, 2025
Merged

gh-132983: Convert zstd __new__ methods to Argument Clinic#133860
AA-Turner merged 9 commits into
python:mainfrom
AA-Turner:zstd-ac-new

Conversation

@AA-Turner

@AA-TurnerAA-Turner commented May 11, 2025

Copy link
Copy Markdown
Member
  • merge the tp_init functions into tp_new and convert the latter to AC. This also means we can remove the initialised member from the object structs.
  • Change the signature of ZstdDict to make the content positional-only and is_raw kw-only.
  • Use Zstandard where appropriate to refer to the compression algorithm, instead of the reference implementation.

A

cc @Rogdham

@AA-Turner
AA-Turner requested a review from emmatypingMay 11, 2025 02:42
@AA-TurnerAA-Turner changed the title gh-133856: Convert zstd __new__ methods to Argument Clinicgh-132983: Convert zstd __new__ methods to Argument ClinicMay 11, 2025
Comment threadModules/_zstd/zstddict.c Outdated
Comment threadModules/_zstd/zstddict.c Outdated

@emmatypingemmatyping 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.

A few suggestions but otherwise looks great!

@AA-Turner
AA-Turner enabled auto-merge (squash) May 12, 2025 08:24
@AA-Turner
AA-Turner merged commit d29ddbd into python:mainMay 12, 2025
@miss-islington-app

Copy link
Copy Markdown

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

@AA-Turner
AA-Turner deleted the zstd-ac-new branch May 12, 2025 08:51
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 12, 2025
…ythonGH-133860)
(cherry picked from commit d29ddbd)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@bedevere-app

Copy link
Copy Markdown

GH-133915 is a backport of this pull request to the 3.14 branch.

@encukou

Copy link
Copy Markdown
Member

Since this was merged, buildbots started showing reference leaks, e.g. here.

@encukou

Copy link
Copy Markdown
Member

See #133962 for a fix-up.

AA-Turner added a commit that referenced this pull request May 20, 2025
…GH-133860) (#133915)
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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@AA-Turner@encukou@emmatyping