Skip to content

Comments

Support Python 3.14 (without changes to github actions)#238

Closed
robinvandernoord wants to merge 1 commit intodottxt-ai:mainfrom
educationwarehouse:python-3.14-without-gh-action
Closed

Support Python 3.14 (without changes to github actions)#238
robinvandernoord wants to merge 1 commit intodottxt-ai:mainfrom
educationwarehouse:python-3.14-without-gh-action

Conversation

@robinvandernoord
Copy link
Contributor

As suggested by @ngoldbaum in #235, I'm recreating a PR for the Python 3.14 fix without the changes in the .github/workflows/build_wheels.yml file.
This because while outlines-core works on 3.14 with the updated dependencies, not all tests pass yet due to dependencies (numba, torch) that are not yet compatible. I've attached the description of my original PR for reference:


I've updated the required dependencies (pyo3 and serde-pyobject) to versions that support Python 3.14.
This caused a compilation error when building, which I've fixed in src/python_bindings/mod.rs by adding a type hint.
Furthermore, I've added 3.14 as a build target in the build_wheels.yml github workflow.

Running make test still failed on 4 tests:

FAILED tests/test_kernels.py::test_interface_torch - RuntimeError: torch.compile is not supported on Python 3.14+
FAILED tests/test_kernels.py::test_interface_numpy - ImportError: To use the kernels in `outlines_core.kernels.numpy`, `numba` must be installed. You can install it with `pip install numba`
FAILED tests/test_kernels.py::test_torch_correctness - RuntimeError: torch.compile is not supported on Python 3.14+
FAILED tests/test_kernels.py::test_numpy_correctness - ImportError: To use the kernels in `outlines_core.kernels.numpy`, `numba` must be installed. You can install it with `pip install numba`

This is due to numba not supporting 3.14 and torch only partially supporting it.

…4, add type hint required to compile with new versions
@ngoldbaum
Copy link
Contributor

@RobinPicard is there any chance we can get some maintainer attention here? It'd be nice to make sure the main branch is buildable on 3.14. I'd also like to work on adding support for the free-threaded build towards unblocking vLLM support on the free-threaded build and this is a necessary pre-requisite. See vllm-project/vllm#28762.

@RobinPicard
Copy link
Contributor

RobinPicard commented Jan 7, 2026

Hi @ngoldbaum! Yes, I was looking at it today actually. I tried running the tests on the branch of #235 and everything worked. I wanted to rebase and push, but I don't have the permissions to do so. Could you let me push commits on your branch @robinvandernoord please?

@robinvandernoord
Copy link
Contributor Author

@RobinPicard thanks for looking into it! I've invited you with write access to the fork. If you need anything else, please let me know!

@RobinPicard
Copy link
Contributor

Closing the PR as #235 has been merged. Thanks @robinvandernoord and @ngoldbaum!

@RobinPicard RobinPicard closed this Jan 9, 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.

3 participants