[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-12 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8e27f8398a4f by Victor Stinner in branch 'default': Issue #25353: Optimize unicode escape and raw unicode escape encoders to use https://hg.python.org/cpython/rev/8e27f8398a4f -- nosy: +python-dev ___ Pyt

[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-09 Thread STINNER Victor
STINNER Victor added the comment: The _PyBytesWriter API was added in the issue #25318. See also the issue #25349 which optimized bytes % args. -- ___ Python tracker ___ ___

[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-09 Thread STINNER Victor
STINNER Victor added the comment: A few more encoders should be updated to use _PyBytesWriter API: * Code Page (Windows only) * Charmap * UTF-7 * UTF-16 * UTF-32 -- ___ Python tracker _

[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-09 Thread STINNER Victor
New submission from STINNER Victor: Attached patch modifies unicode escape and raw unicode escape encoders to use the new _PyBytesWriter API. The patch is optimized to encode Latin1 characters: encoding Latin1 characters when no character is escaped should not have to call _PyByte_Resize() at