Skip to content

gh-157710: Soft deprecate C API modifying str objects - #157711

Open
vstinner wants to merge 2 commits into
python:mainfrom
vstinner:deprecate_unicode_capi
Open

vstinner wants to merge 2 commits into
python:mainfrom
vstinner:deprecate_unicode_capi

Conversation

@vstinner

@vstinner vstinner commented Sep 17, 2026

Copy link
Copy Markdown
Member

Soft deprecate PyUnicode_New(), PyUnicode_CopyCharacters(), PyUnicode_Fill(), PyUnicode_Resize(), PyUnicode_WRITE() and PyUnicode_WriteChar() functions. Use the PyUnicodeWriter API instead.

Soft deprecate PyUnicode_New(), PyUnicode_CopyCharacters(),
PyUnicode_Fill(), PyUnicode_Resize(), PyUnicode_WRITE() and
PyUnicode_WriteChar() functions. Use the PyUnicodeWriter API instead.

Mention also that PyUnicodeWriter is not thread safe.
@vstinner

Copy link
Copy Markdown
Member Author

@read-the-docs-community

read-the-docs-community Bot commented Sep 17, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34622745 | 📁 Comparing 25543c3 against main (5539c2a)

  🔍 Preview build  

3 files changed
± c-api/unicode.html
± whatsnew/3.16.html
± whatsnew/changelog.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant