Skip to content

Conversation

@davidhewitt
Copy link
Contributor

First step towards getting tokenizers working on Python 3.14 free-threading.

This PR bumps PyO3 to 0.26. There are three major deprecations in this release, which cleaned up a bunch of PyO3 APIs to remove the "gil" association (which free-threading doesn't have). Each is carried out as a separate commit; in the final commit removing the PyObject type alias for Py<PyAny> I happened upon a number of bits of code which had obvious simplifications. I applied those at the same time.

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

LGTM
Is my understanding correct that with pyo3 0.26, building for py<3.14 will still work?

@HuggingFaceDocBuilderDev

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.

@davidhewitt
Copy link
Contributor Author

LGTM Is my understanding correct that with pyo3 0.26, building for py<3.14 will still work?

Yes, we still support python 3.7+.

I'll fix the lint failures ASAP, probably later today.

@davidhewitt
Copy link
Contributor Author

Lints fixed in 78af191

Copy link
Contributor

@ngoldbaum ngoldbaum left a comment

Choose a reason for hiding this comment

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

Thanks for taking this on!

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Thanks a lot 🤗

@ArthurZucker ArthurZucker merged commit ebbc3c8 into huggingface:main Dec 2, 2025
29 checks passed
@ngoldbaum ngoldbaum mentioned this pull request Jan 5, 2026
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.

4 participants