Skip to content

Add support for GIL-free Python runtimes #298

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

Merged
merged 7 commits into from
Jul 29, 2025

Conversation

lonvia
Copy link
Member

@lonvia lonvia commented Jul 29, 2025

This adds experimental support for running pyosmium in free-threading mode.

There are no changes to the code required as pyosmium doesn't keep global state and is already reentrant. Objects created by the library are not thread-safe for writing. This is by design to keep overhead low for the usual non-threaded case. It is the user's responsibility to guard write accesses with locks as required. This behaviour is now documented.

Tests needed some restructuring to make them executable in parallel. You can now run the tests using pytest-run-parallel. The CI will now build for 3.13t and 3.14t and test those build in parallel mode.

The PR also enables 3.14 for the CI. Currently the test requiring shapely is disabled because there are no binary wheels for shapely yet and compiling on the fly is a major pain.

@lonvia lonvia merged commit 24ea43a into osmcode:master Jul 29, 2025
79 of 84 checks passed
@lonvia lonvia deleted the python-free-threading branch July 29, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant