Skip to content

Conversation

@vstinner
Copy link
Member

TODO: update API doc.

@vstinner
Copy link
Member Author

Wait until python/cpython#119184 is merged.

TODO: update API doc.
@vstinner vstinner changed the title WIP: Add PyUnicodeWriter API Add PyUnicodeWriter API Jul 18, 2024
@vstinner vstinner marked this pull request as ready for review July 18, 2024 20:57
@vstinner vstinner merged commit 4094c64 into python:main Jul 18, 2024
@vstinner vstinner deleted the writer branch July 18, 2024 20:59
@seberg
Copy link

seberg commented Aug 6, 2024

It seems to me that PyUnicodeWriter_WriteRepr and PyUnicodeWriter_WriteStr are missing the static inline to ensure multiple includes don't collide?

@vstinner
Copy link
Member Author

vstinner commented Aug 6, 2024

It seems to me that PyUnicodeWriter_WriteRepr and PyUnicodeWriter_WriteStr are missing the static inline to ensure multiple includes don't collide?

Oops, fixed by #104.

@Rogdham
Copy link

Rogdham commented Jun 20, 2025

#if PY_VERSION_HEX < 0x030E0000 && PY_VERSION_HEX >= 0x03060000 && !defined(PYPY_VERSION)
// snip
PyErr_Format(PyExc_TypeError, "expect str, not %T", str);

I did not experience the issue myself, but I think the %T format was introduced in gha-116839 (PEP-737), so may not be available on all versions of CPython?

@vstinner
Copy link
Member Author

@Rogdham:

I did not experience the issue myself, but I think the %T format was introduced in python/cpython#116839 (PEP-737), so may not be available on all versions of CPython?

Oops, well spotted: I created #146 to fix the issue.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants