Skip to content

[3.15] gh-156939: Add tests on the PyUnicode C API - #159533

Merged
vstinner merged 2 commits into
python:3.15from
vstinner:test_id_api15
Oct 16, 2026
Merged

vstinner merged 2 commits into
python:3.15from
vstinner:test_id_api15

Conversation

@vstinner

@vstinner vstinner commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Add tests on functions:

* PyUnicode_CHECK_INTERNED()
* PyUnicode_Check()
* PyUnicode_CheckExact()
* PyUnicode_Equal()
* PyUnicode_GET_LENGTH()
* PyUnicode_IS_ASCII()
* PyUnicode_IS_COMPACT()
* PyUnicode_IS_COMPACT_ASCII()
* PyUnicode_KIND()
* PyUnicode_MAX_CHAR_VALUE()
* PyUnicode_READ()
* PyUnicode_READ_CHAR()
* PyUnicode_WRITE()

Changes:

* Add test on PyUnicode_FromOrdinal(0).
* Require _testcapi module in test_capi.test_unicode. Since _testcapi
  is specific to CPython, remove @support.cpython_only.

(cherry picked from commit e8f6448)
@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Oct 16, 2026
@vstinner vstinner removed the type-feature A feature request or enhancement label Oct 16, 2026
@vstinner
vstinner merged commit bcbe9bc into python:3.15 Oct 16, 2026
57 of 60 checks passed
@vstinner
vstinner deleted the test_id_api15 branch October 16, 2026 14:40
@vstinner vstinner added the needs backport to 3.14 bugs and security fixes label Oct 16, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @vstinner, I could not cleanly backport this to 3.14 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker bcbe9bcbad03d44dd1188422beb22f2f434e28c4 3.14

@bedevere-app

bedevere-app Bot commented Oct 16, 2026

Copy link
Copy Markdown

GH-159539 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 16, 2026
vstinner added a commit that referenced this pull request Oct 16, 2026
[3.15] gh-156939: Add tests on the PyUnicode C API (#159533)

* gh-142217: Add tests on the deprecated _Py_Identifier C API (#157638)

(cherry picked from commit 21403af)

* gh-156939: Add tests on the PyUnicode C API (#157798)

Add tests on functions:

* PyUnicode_CHECK_INTERNED()
* PyUnicode_Check()
* PyUnicode_CheckExact()
* PyUnicode_Equal()
* PyUnicode_GET_LENGTH()
* PyUnicode_IS_ASCII()
* PyUnicode_IS_COMPACT()
* PyUnicode_IS_COMPACT_ASCII()
* PyUnicode_KIND()
* PyUnicode_MAX_CHAR_VALUE()
* PyUnicode_READ()
* PyUnicode_READ_CHAR()
* PyUnicode_WRITE()

Changes:

* Add test on PyUnicode_FromOrdinal(0).
* Require _testcapi module in test_capi.test_unicode. Since _testcapi
  is specific to CPython, remove @support.cpython_only.

(cherry picked from commit e8f6448)
(cherry picked from commit bcbe9bc)
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.

1 participant