Skip to content

Conversation

ngoldbaum
Copy link
Contributor

See #406 (comment).

It may be a little presumptuous to add wheel builds already but it looks like that's how CI is set up in this repo. It may also make sense to add some more tests that use either rayon or the python threading module. That said, IMO you'd be testing guarantees provided by PyO3 more than tiktoken itself.

@ngoldbaum
Copy link
Contributor Author

ngoldbaum commented Aug 28, 2025

From the cibuildwheel logs:

<frozen importlib._bootstrap>:488: RuntimeWarning: The global interpreter lock (GIL) has been enabled to load module 'regex._regex', which has not declared that it can run safely without the GIL. To override this behavior and keep the GIL disabled (at your own risk), run with PYTHON_GIL=0 or -Xgil=0.

https://github.com/ngoldbaum/tiktoken/actions/runs/17308679370/job/49137906087#step:3:1256

See #406 (comment) and replies for more about this.

For now, maybe I should set PYTHON_GIL=0 for the cp313t build?

@ngoldbaum
Copy link
Contributor Author

Let me know if you'd like me to split off 1ecd757 into its own PR without the cp314t builds.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thank you! (We have some tests that do end up lightly using threads internally, so I guess if we switch to a free threaded build internally we'll get a little more coverage)

@hauntsaninja hauntsaninja merged commit 2ab6d37 into openai:main Sep 1, 2025
34 checks passed
@ngoldbaum
Copy link
Contributor Author

ngoldbaum commented Sep 1, 2025

so I guess if we switch to a free threaded build internally we'll get a little more coverage

Cool! We have a discord you can join if you want to chat more or ask questions in realtime: https://py-free-threading.github.io/#news-and-getting-help

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.

2 participants