FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-140009: Replace PyTuple_Pack with PyTuple_FromArray in _warnings by andrewloux · Pull Request #144760 · python/cpython · GitHub

Repository navigation

gh-140009: Replace PyTuple_Pack with PyTuple_FromArray in _warnings - #144760

Closed
andrewloux wants to merge 1 commit into
python:mainfrom
andrewloux:pytuple-fromarray-warnings
Closed

andrewloux wants to merge 1 commit into
python:mainfrom
andrewloux:pytuple-fromarray-warnings

Conversation

andrewloux commented Feb 12, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown

Replaces PyTuple_Pack(N, ...) calls with PyTuple_FromArray() in Python/_warnings.c, avoiding variadic function call overhead.

Four call sites converted (2-element, 3-element, and 5-element tuples). PyTuple_Pack(1, ...) calls are not present in this file.

Part of #140009.

python-cla-bot Bot commented Feb 12, 2026 •
edited
Loading

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

bedevere-app Bot commented Feb 12, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

andrewloux force-pushed the pytuple-fromarray-warnings branch from 57375b3 to cca09a7 Compare February 12, 2026 20:52

bedevere-app Bot commented Feb 12, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Copy link
Copy Markdown
Author

Closing since the pyperf numbers I posted above don’t show a measurable improvement (benchmarks within noise / not significant). Happy to reopen / redo with a different benchmark methodology if maintainers think this is still worth taking for Python/_warnings.c.

andrewloux closed this Feb 12, 2026
andrewloux deleted the pytuple-fromarray-warnings branch February 13, 2026 03:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL