Skip to content

gh-143883: Add missing named parameters in public PyModExport C bindings - #143884

Merged
encukou merged 6 commits into
python:mainfrom
ngoldbaum:fix-wrapper-decl
Jan 27, 2026
Merged

encukou merged 6 commits into
python:mainfrom
ngoldbaum:fix-wrapper-decl

Conversation

@ngoldbaum

@ngoldbaum ngoldbaum commented Jan 15, 2026 •

Copy link
Copy Markdown
Contributor
@ngoldbaum

Copy link
Copy Markdown
Contributor Author

ping @encukou since you wrote this code originally

@ngoldbaum

Copy link
Copy Markdown
Contributor Author

Looks like unrelated CI issues are causing the failures

@encukou

encukou commented Jan 16, 2026

Copy link
Copy Markdown
Member

Thanks for the catch!
While you're here, could you rename the others to module (rather than mod), and add a missing name to docs?
Or let me know if I should take over.

(Failures are indeed unrelated: Ubuntu was down)

@ngoldbaum

Copy link
Copy Markdown
Contributor Author

I did some minor wording tweaks in the docs to adapt to the name changes, let me know if you have suggestions there.

@encukou

encukou commented Jan 26, 2026

Copy link
Copy Markdown
Member

Hi! Sorry, I wasn't clear above.

If the argument names matter, it'd be better to avoid abbrevs: module rather than mod.
I've sent a PR to your branch, does it look good? ngoldbaum#1

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

LGTM. I also prefer to use the name "module" instead of "mod".

@da-woods

Copy link
Copy Markdown
Contributor

Quick note: module is a "soft-keyword" in C++20. So it's fine to use it as an argument name, but I had to do a little bit of reading to convinced myself that this was actually true.

@vstinner

Copy link
Copy Markdown
Member

Quick note: module is a "soft-keyword" in C++20. So it's fine to use it as an argument name, but I had to do a little bit of reading to convinced myself that this was actually true.

I modified locally test_cppext to test C++20. I confirm that the usage of the module name is fine with C++20.

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

Re-reading this, “the module module“ is repetitive. Sorry for not catching this earlier.

I'll merge after I check the rendered docs for this.

Comment thread Doc/c-api/module.rst Resolved
Comment thread Doc/c-api/module.rst Resolved
Comment thread Doc/c-api/module.rst Resolved
@encukou

encukou commented Jan 27, 2026 •

Copy link
Copy Markdown
Member

We've been declaring a module argument elsewhere for over a decade :)

@encukou
encukou enabled auto-merge (squash) January 27, 2026 10:07
@encukou
encukou merged commit f2b5c20 into python:main Jan 27, 2026
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants