]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-76595: Add tests for PyCapsule_Import() (GH-154588)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 24 Jul 2026 15:01:56 +0000 (18:01 +0300)
committerGitHub <noreply@github.com>
Fri, 24 Jul 2026 15:01:56 +0000 (18:01 +0300)
commitd24d9d0f1d1177cd6f130a4bd59c1c267a0f8d1f
treeb30191f59ee253ccd872c39a2f03398fa0c8681d
parent45a10f5d711ebe1bce9c6b93c10bbc5fe5bdf392
gh-76595: Add tests for PyCapsule_Import() (GH-154588)

Add _testcapi helpers to create a capsule with an arbitrary name and to call PyCapsule_Import(), and Python tests covering the current behavior: only the first component of the dotted name is imported, the rest are attribute lookups.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Lib/test/test_capi/test_capsule.py [new file with mode: 0644]
Misc/NEWS.d/next/Tests/2026-07-24-12-00-00.gh-issue-76595.KfF5xR.rst [new file with mode: 0644]
Modules/Setup.stdlib.in
Modules/_testlimitedcapi.c
Modules/_testlimitedcapi/capsule.c [new file with mode: 0644]
Modules/_testlimitedcapi/parts.h
PCbuild/_testlimitedcapi.vcxproj
PCbuild/_testlimitedcapi.vcxproj.filters