Skip to content

gh-158451: Remove _PyUnicodeWriter_WriteASCIIString() read-only optim - #159141

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:unicode_write_ascii
Oct 10, 2026
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:unicode_write_ascii

Conversation

@vstinner

@vstinner vstinner commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

The optimization is not worth it, _PyUnicode_FromASCII() doesn't make anything special.

… optim

The optimization is not worth it, _PyUnicode_FromASCII() doesn't make
anything special.
@vstinner

Copy link
Copy Markdown
Member Author

By the way, the new public PyUnicodeWriter C API enables overallocation, and so it didn't take the removed code path.

@vstinner
vstinner enabled auto-merge (squash) October 10, 2026 19:48
@vstinner
vstinner merged commit 8bf6305 into python:main Oct 10, 2026
56 checks passed
@vstinner
vstinner deleted the unicode_write_ascii branch October 10, 2026 20:09
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