Skip to content

Conversation

@vstinner
Copy link
Member

TODO: update API doc.

@vstinner
Copy link
MemberAuthor

Wait until python/cpython#119184 is merged.

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

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
MemberAuthor

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

#ifPY_VERSION_HEX<0x030E0000&&PY_VERSION_HEX >= 0x03060000&& !defined(PYPY_VERSION) // snipPyErr_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
MemberAuthor

@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 freeto 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

@vstinner@seberg@Rogdham