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

Use _testlimitedcapi in test_free_threading.test_capi by vstinner · Pull Request #158935 · python/cpython · GitHub

Repository navigation

Use _testlimitedcapi in test_free_threading.test_capi - #158935

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:test_ft_capi
Oct 6, 2026
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:test_ft_capi

Conversation

vstinner commented Oct 6, 2026

Copy link
Copy Markdown
Member

Replace ctypes with _testlimitedcapi. ctypes is not always available, and _testlimitedcapi is a thin wrapper to the C API.

Replace ctypes with _testlimitedcapi. ctypes is not always available,
and _testlimitedcapi is a thin wrapper to the C API.
bedevere-app Bot added awaiting core review tests Tests in the Lib/test dir labels Oct 6, 2026
vstinner added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Oct 6, 2026

vstinner commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

test_free_threading.test_capi failed on AMD64 FreeBSD15 NoGIL 3.x: https://buildbot.python.org/#/builders/2364/builds/1. It failed because the _ctypes extension module is missing. That's why I proposed this change.

Note: _testlimitedcapi.PyImport_AddModuleRef also exists in Python 3.14.

vstinner enabled auto-merge (squash) October 6, 2026 20:50
vstinner disabled auto-merge October 6, 2026 21:03
vstinner merged commit 1818fba into python:main Oct 6, 2026
61 checks passed
vstinner deleted the test_ft_capi branch October 6, 2026 21:03

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

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

cherry_picker 1818fba7e737320b4241fdde095146a4c52c0e63 3.15

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 1818fba7e737320b4241fdde095146a4c52c0e63 3.14

vstinner added a commit to vstinner/cpython that referenced this pull request Oct 10, 2026
Replace ctypes with _testlimitedcapi. ctypes is not always available,
and _testlimitedcapi is a thin wrapper to the C API.

Skip the test if _testlimitedcapi is missing.

(cherry picked from commit 1818fba)

bedevere-app Bot commented Oct 10, 2026

Copy link
Copy Markdown

GH-159146 is a backport of this pull request to the 3.15 branch.

bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 10, 2026
vstinner removed the needs backport to 3.14 bugs and security fixes label Oct 10, 2026
vstinner added a commit that referenced this pull request Oct 10, 2026
#159146)

Use _testlimitedcapi in test_free_threading.test_capi (#158935)

Replace ctypes with _testlimitedcapi. ctypes is not always available,
and _testlimitedcapi is a thin wrapper to the C API.

Skip the test if _testlimitedcapi is missing.

(cherry picked from commit 1818fba)
vstinner added a commit that referenced this pull request Oct 10, 2026
…) (GH-159146) (#159147)

[3.15] Use _testlimitedcapi in test_free_threading.test_capi (GH-158935) (GH-159146)

Use _testlimitedcapi in test_free_threading.test_capi (GH-158935)

Replace ctypes with _testlimitedcapi. ctypes is not always available,
and _testlimitedcapi is a thin wrapper to the C API.

Skip the test if _testlimitedcapi is missing.
(cherry picked from commit c777fe5)


(cherry picked from commit 1818fba)

Co-authored-by: Victor Stinner <vstinner@python.org>
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

skip issue skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL