Support the free-threaded build
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- build-system, testing
Research direction
Start with pyproject.toml and tests/test_harmony.py, then run PYTHON_GIL=0 pytest on a free-threaded Python 3.14 build. Review the existing source-build and wheel setup, and confirm that free-threaded support includes version-specific wheels and multithreaded test coverage.
Written by the indexing model from the issue text.
Description
I'm working on ecosystem support for free-threaded Python as part of the broader effort to introduce free-threaded Python. Lately, I've been actively working on adding support for free-threaded Python 3.14. Ultimately I'd like to make it possible to run vLLM on free-threaded Python 3.14: https://github.com/vllm-project/vllm/issues/28762.
Currently openai-harmony ships abi3 wheels. Unfortunately, the free-threaded build cannot support abi3 and the existing wheels cannot be installed on the free-threaded build. Hopefully Python 3.15 will support a new version of the stable ABI, but for Python 3.14 you'll need to build version-specific wheels if you'd like to support the free-threaded build.
Are you open to this? I'm happy to put in the bulk of the work. I'm also a PyO3 maintainer and helped add support in PyO3 for the free-threaded build.
I'm able to build the project from source on free-threaded 3.14.0 and all the tests pass when I force-disable the GIL:
goldbaum at Nathans-MBP in ~/Documents/harmony on main
± PYTHON_GIL=0 pytest
================================================================================= test session starts ==================================================================================
platform darwin -- Python 3.14.0, pytest-8.3.3, pluggy-1.6.0
Using --randomly-seed=624209616
rootdir: /Users/goldbaum/Documents/harmony
configfile: pyproject.toml
testpaths: tests
plugins: hypothesis-6.137.1, anyio-4.11.0, scipy_doctest-2.0.1, xdist-3.8.0, timeout-2.4.0, cov-4.1.0, run-parallel-0.7.0, randomly-4.0.1
collected 42 items
Collected 0 items to run in parallel
tests/test_harmony.py .......................................... [100%]
================================================================================== 42 passed in 4.43s ==================================================================================
I don't see any explicitly multithreaded tests. It'd be nice to have some multithreaded testing to probe behavior that will only happen on the free-threaded build.
I don't see any unsafe impl Send or Sync so I think the extension itself should be thread-safe and doesn't rely on the GIL. That said, I haven't done a detailed thread safety pass.
- Dominant language
- Rust
- Stars
- 4.5k
- Forks
- 315
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/harmony
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Rendering is quadratic in the length of a single messagePossibly taken @rksharma-owg claimed this 47 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Python asyncio eventloop run_in_executor with ThreadPoolExecutor is not workingPossibly taken @Gnoale claimed this 208 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Small glitchOpenpriority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
storytold/photocraft#9538 ·
Maintainers usually reply within 1 day
-
bug P2 rust
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jscott3201/rusty-bacnet#2085 ·
Maintainers usually reply within 1 day
-
area:tag area:tag---json---markdown--n bug factory:dogfood factory:triaged persona:scripter platform:linux-cloud priority:p3 type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
gitbutlerapp/grit#1940 · 1 comment ·
Maintainers usually reply within 1 day
-
Inconsistent case in names for Windows installation packages compared to all other assetsPossibly taken A pull request linked to this issue is open or already merged. Openarea:ui bug in progress needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 65/100
bherbruck/solvecraft#6769 · 2 comments ·