Uh oh!
There was an error while loading. Please reload this page.
gh-140009: Replace PyTuple_Pack with PyTuple_FromArray in _warnings - #144760
gh-140009: Replace PyTuple_Pack with PyTuple_FromArray in _warnings#144760andrewloux wants to merge 1 commit into
Conversation
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 |
57375b3 to
cca09a7CompareMost 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 |
andrewloux
commented
Feb 12, 2026
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. |
Replaces
PyTuple_Pack(N, ...)calls withPyTuple_FromArray()inPython/_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.