Closed
Description
Replace PyUnicode_New()
, PyUnicode_CopyCharacters()
, etc. with PyUnicodeWriter
. It avoids creating incomplete Unicode strings: see Avoid creating incomplete/invalid objects.
Linked PRs
- gh-125196: Use PyUnicodeWriter in symtable.c #125199
- gh-125196: Add PyUnicodeWriter_Fill() function #125201
- gh-125196: Use PyUnicodeWriter for repr(list) #125202
- gh-125196: Add fast-path for int in PyUnicodeWriter_WriteStr() #125214
- gh-125196: Use PyUnicodeWriter for repr(structseq) #125219
- gh-125196: Use PyUnicodeWriter for repr(contextvars.Token) #125220
- gh-125196: PyUnicodeWriter_Discard(NULL) does nothing #125222
- gh-125196: Add a free list to PyUnicodeWriter #125227
- gh-125196: Use PyUnicodeWriter for repr(tuple) #125242
- gh-125196: Use PyUnicodeWriter for JSON encoder #125249
- gh-125196: Use PyUnicodeWriter in error handlers #125262
- gh-125196: Use PyUnicodeWriter for repr(dict) #125270
- gh-125196: Use PyUnicodeWriter in parser #125271
- gh-125196: Use PyUnicodeWriter in HAMT #125458
- gh-125196: Use PyUnicodeWriter in _io.StringIO #125528