FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-142217: Add tests on the deprecated _Py_Identifier C API by vstinner · Pull Request #157638 · python/cpython · GitHub

Repository navigation

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

Merged
vstinner merged 3 commits into
python:mainfrom
vstinner:test_py_id
Sep 17, 2026
Merged

vstinner merged 3 commits into
python:mainfrom
vstinner:test_py_id

Conversation

vstinner commented Sep 16, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Replace PyDict_GetItemWithError() with PyDict_GetItemRef() and remove outdated comment in Modules/_pickle.c.

Replace PyDict_GetItemWithError() with PyDict_GetItemRef() and remove
outdated comment in Modules/_pickle.c.

Copy link
Copy Markdown
Member Author

While these macros and functions are deprecated, we still have to support them until October 2030 (Python 3.19.0 final release). So I prefer to test this (deprecated and undocumented) C API.

vstinner merged commit 21403af into python:main Sep 17, 2026
54 checks passed
vstinner deleted the test_py_id branch September 17, 2026 11:45
vstinner added a commit that referenced this pull request Oct 16, 2026
* 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)
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL