Skip to content

Do not load arch kernels on free-threaded Python#494

Open
danieldk wants to merge 4 commits intomainfrom
handle-python3-free-threading
Open

Do not load arch kernels on free-threaded Python#494
danieldk wants to merge 4 commits intomainfrom
handle-python3-free-threading

Conversation

@danieldk
Copy link
Copy Markdown
Member

@danieldk danieldk commented Apr 21, 2026

Free-threaded Python interpreters do not support ABI3 before Python 3.15, so there is no way to extensions that use a stable ABI. So to avoid segfaulting, we disable support for arch kernels on such interpreters.

Also see #312.

Free-threaded Python interpreters do not support ABI3 before Python
3.15, so there is no way to extensions that use a stable ABI. So
to avoid segfaulting, we disable support for arch kernels on such
interpreters.
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

sayakpaul
sayakpaul previously approved these changes Apr 24, 2026
Copy link
Copy Markdown
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! How about we also add a test to check if warning is properly raised?

Comment thread docs/source/installation.md Outdated
def test_version():
kernel = get_kernel("kernels-test/versions", version=1)
assert kernel.version() == "1"
assert kernel.version() == 1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought these were already fixed in my previous PRs.

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
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.

3 participants