[3.14] gh-133968: Add PyUnicodeWriter_WriteASCII() function (#133973)#134974
[3.14] gh-133968: Add PyUnicodeWriter_WriteASCII() function (#133973)#134974vstinner merged 1 commit intopython:3.14from
Conversation
|
@hugovk: Hi, can I have an exception to add this late feature into Python 3.14 after the feature freeze? It was decided late but it comes with the This change fix also a performance regression compared to Python 3.13: Using the public PyUnicodeWriter C API made the json module slower.
|
|
I used
|
|
Ping @hugovk. |
|
This is okay for 3.14. |
| On success, return ``0``. | ||
| On error, set an exception, leave the writer unchanged, and return ``-1``. | ||
|
|
||
| .. versionadded:: next |
There was a problem hiding this comment.
This will need updating in main to 3.14.
|
Follow-up:
|
Replace most PyUnicodeWriter_WriteUTF8() calls with PyUnicodeWriter_WriteASCII().
(cherry picked from commit f49a07b)
📚 Documentation preview 📚: https://cpython-previews--134974.org.readthedocs.build/