Skip to content

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

@vstinner 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 bedevere-app Bot added awaiting core review tests Tests in the Lib/test dir labels Oct 6, 2026
@vstinner vstinner added needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Oct 6, 2026
@vstinner

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
vstinner enabled auto-merge (squash) October 6, 2026 20:50
@vstinner
vstinner disabled auto-merge October 6, 2026 21:03
@vstinner
vstinner merged commit 1818fba into python:main Oct 6, 2026
61 checks passed
@vstinner
vstinner deleted the test_ft_capi branch October 6, 2026 21:03
@miss-islington-app

Copy link
Copy Markdown

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

@miss-islington-app

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes 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