gh-157710: Detect overflow in PyUnicodeWriter_Finish() #157715

Merged
vstinner opened 5:40pm on September 17, 2026 wanted to merge 91 Δ into python/cpython main from
unicode_overflow

Pull request #157715 quality checks

Code files and functions touched by this pull request are analyzed below.

Quality targets

How does this pull request compare to chosen code quality targets? Read more about code quality targets.

Target name Target value This PR
Maximum Diff Delta per PR 500 91
Maximum comment count per PR 10 0
Pull request maximum business days between activity 3 0
Pull request maximum business days open 5 1

Coupled files

Are there any files from this commit that are always committed alongside another file? This often suggests that there exists code coupling to potentially remove. Read more about code coupling

No file coupling detected. 🎉

Biggest files changes in pull request

Path View whole file Lines removed Lines added Final line count
Modules/_testinternalcapi.c 0 23 3581
Objects/unicodeobject.c 3 4 15436
Lib/test/test_capi/test_unicode.py 0 18 2084
Objects/unicode_writer.c 0 15 668
Misc/NEWS.d/next/C_API/2026-09-18-00-29-49.gh-issue-157710.Q_AD8D.rst 0 0 ---

️ Biggest functions grown or shrunk by pull request

Which functions had their line count change as part of this pull request?

Could not find any functions changed by this pull request.