-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
[3.14] gh-133968: Add PyUnicodeWriter_WriteASCII() function (#133973) #134974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/