Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please could markupsafe._speedups declare support (or lack thereof) for free-threaded Python? #460

Closed
AA-Turner opened this issue Aug 18, 2024 · 3 comments
Milestone

Comments

@AA-Turner
Copy link

When testing a project downstream of markupsafe with python3.13t via deadsnakes, the following warning is emitted:

<frozen importlib._bootstrap>:488
  <frozen importlib._bootstrap>:488: RuntimeWarning: The global interpreter lock (GIL) has been enabled to load module 'markupsafe._speedups', 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.

I haven't had the time to look at the source of _speedups (sorry), but please would it be possible to declare this one way or the other? I resolved this with an axe downstream by simply deleting the compiled extension in CI, but this isn't ideal!

Thanks,
Adam

@davidism
Copy link
Member

How? Can you point me to instructions about this or make a PR to review?

@AA-Turner
Copy link
Author

I'm on mobile so please excuse the brevity -- there are guides here (https://py-free-threading.github.io/porting/#__tabbed_1_1) on porting, and also on CI testing (https://py-free-threading.github.io/ci/). The CPython docs also have a brief HOWTO (https://docs.python.org/3.14/howto/free-threading-extensions.html).

I'm unlikely to have time to make a PR until mid-September at the earliest, sorry.

A

@davidism
Copy link
Member

Thanks, seems like we need to add a marker and update cibuildwheel. I won't be able to get to this soon either, unfortunately, so anyone who sees this and has time for a PR would be appreciated.

@davidism davidism added this to the 3.0.0 milestone Oct 7, 2024
@davidism davidism closed this as completed Oct 7, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants