Skip to content

[3.14] gh-157710: Add MemoryError tests to PyUnicodeWriter - #159557

Merged
vstinner merged 1 commit into
python:3.14from
vstinner:unicode14
Oct 16, 2026
Merged

vstinner merged 1 commit into
python:3.14from
vstinner:unicode14

Conversation

@vstinner

Copy link
Copy Markdown
Member

Make sure that a writer can be modified before writing into it.

  • Document that PyUnicodeWriter is not thread safe.
  • Add singletons tests to test_capi.test_unicode.
  • Check PyUnicode_CheckExact() earlier in _PyUnicode_IsModifiable().

(cherry picked from commit 8542958)

Add a test changing the buffer kind multiple times.

Add assertions to _PyUnicodeWriter_InitWithBuffer().

(cherry picked from commit 6b97452)

  • No need to export _PyUnicode_IsModifiable()

(cherry picked from commit adc1127)

…hon#159548)

* pythongh-157710: Add _PyUnicodeWriter_CanWrite() function (python#157712)

Make sure that a writer can be modified before writing into it.

* Document that PyUnicodeWriter is not thread safe.
* Add singletons tests to test_capi.test_unicode.
* Check PyUnicode_CheckExact() earlier in _PyUnicode_IsModifiable().

(cherry picked from commit 8542958)

* pythongh-157710: Add MemoryError tests to PyUnicodeWriter (python#157853)

Add a test changing the buffer kind multiple times.

Add assertions to _PyUnicodeWriter_InitWithBuffer().

(cherry picked from commit 6b97452)

* No need to export _PyUnicode_IsModifiable()

(cherry picked from commit adc1127)
@vstinner vstinner removed the type-feature A feature request or enhancement label Oct 16, 2026
@vstinner
vstinner merged commit 527e9a2 into python:3.14 Oct 16, 2026
53 of 57 checks passed
@vstinner
vstinner deleted the unicode14 branch October 16, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant