Skip to content

GH-145247: Use _PyTuple_FromPair in Modules(2)#148003

Merged
vstinner merged 6 commits intopython:mainfrom
sergey-miryanov:feat/145247-pytuple-from-pair-use-5
Apr 2, 2026
Merged

GH-145247: Use _PyTuple_FromPair in Modules(2)#148003
vstinner merged 6 commits intopython:mainfrom
sergey-miryanov:feat/145247-pytuple-from-pair-use-5

Conversation

@sergey-miryanov
Copy link
Copy Markdown
Contributor

@sergey-miryanov sergey-miryanov commented Apr 2, 2026

Second PR for usage of the _PyTuple_FromPair[Steal] in Modules

Copy link
Copy Markdown
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

Why two PRs for extension modules? Make it one instead please. And then you'll just wait for maintainers to acknowledge their owned part.

@sergey-miryanov
Copy link
Copy Markdown
Contributor Author

I'm OK to merge them into one PR if it's more preferable. As I answered in the first PR it is suggested by @vstinner

Copy link
Copy Markdown
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

Ok for SSL (and probably ok for posix/select/signal/socket though I'm not a codeowner).

sergey-miryanov and others added 3 commits April 2, 2026 22:26
Co-authored-by: Victor Stinner <vstinner@python.org>
…ey-miryanov/cpython into feat/145247-pytuple-from-pair-use-5
Copy link
Copy Markdown
Member

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

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

datetime LGTM

Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@vstinner
Copy link
Copy Markdown
Member

vstinner commented Apr 2, 2026

@picnixz:

Why two PRs for extension modules? Make it one instead please. And then you'll just wait for maintainers to acknowledge their owned part.

It's hard for me to review carefully a PR which changes too many files. So I gave an arbitrary limit of 10 files per PR.

Changes replacing PyTuple_Pack(2) with _PyTuple_FromPair() is straightforward. But changes replacing code with _PyTuple_FromPairSteal() must be carefully reviewed since it can easily introduce refleaks, bugs or crashes.

@vstinner vstinner merged commit c1b20a6 into python:main Apr 2, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants