cocoindex icon indicating copy to clipboard operation
cocoindex copied to clipboard

[FEATURE] Support Python 3.14 free-threaded

Open georgeh0 opened this issue 2 months ago • 5 comments

We want to support Python 3.14 free-threaded build.

See PyO3 guide Supporting Free-Threaded CPython

We need to enable version-specific wheels build (cp314t), before free-threaded have stable ABI support (PEP 803)


❤️ Contributors, please refer to 📙Contributing Guide. Unless the PR can be sent immediately (e.g. just a few lines of code), we recommend you to leave a comment on the issue like I'm working on it or Can I work on this issue? to avoid duplicating work. Our Discord server is always open and friendly.

georgeh0 avatar Oct 15 '25 06:10 georgeh0

We want to support Python 3.14 free-threaded build.

See PyO3 guide Supporting Free-Threaded CPython

We need to enable version-specific wheels build (cp314t), before free-threaded have stable ABI support (PEP 803)


❤️ Contributors, please refer to 📙Contributing Guide. Unless the PR can be sent immediately (e.g. just a few lines of code), we recommend you to leave a comment on the issue like I'm working on it or Can I work on this issue? to avoid duplicating work. Our Discord server is always open and friendly.

This is awesome , getting the new python's concurrent and parallelism feature would boost cocoindex performance as well !!

ansu86d avatar Oct 15 '25 19:10 ansu86d

Can I work on this issue?

wuxiaobai24 avatar Nov 21 '25 11:11 wuxiaobai24

Hi @wuxiaobai24, welcome to contribute! Assigned.

georgeh0 avatar Nov 21 '25 15:11 georgeh0

I tried building with Python 3.14t and discovered that lancedb does not support cp314. Before cocoindex can support Python 3.14, we need to get lancedb to support it first.

You can reproduce the issue using the following steps:

uv venv --python 3.14t .venv
source .venv/bin/activate
pip install maturin
maturin develop -E lancedb

You will get this output:

🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings with abi3 support
🐍 Found CPython 3.14t at /home/wxb24/code/cocoindex/.venv/bin/python
📡 Using build options features, bindings from pyproject.toml
  × No solution found when resolving dependencies:
  ╰─▶ Because only the following versions of lancedb are available:
          lancedb<=0.25.0
          lancedb==0.25.1 
          lancedb==0.25.2
          lancedb==0.25.3
      and lancedb>=0.25.0 has no wheels with a matching Python implementation tag (e.g., `cp314`), we can conclude that lancedb>=0.25.0 cannot be used.
      And because you require lancedb>=0.25.0, we can conclude that your requirements are unsatisfiable.

      hint: You require CPython 3.14 (`cp314`), but we only found wheels for `lancedb` (v0.25.3) with the following Python implementation tag: `cp39`
💥 maturin failed
  Caused by: uv pip install finished with "exit status: 1"

wuxiaobai24 avatar Nov 27 '25 00:11 wuxiaobai24

I tried building with Python 3.14t and discovered that lancedb does not support cp314. Before cocoindex can support Python 3.14, we need to get lancedb to support it first.

You can reproduce the issue using the following steps:

uv venv --python 3.14t .venv source .venv/bin/activate pip install maturin maturin develop -E lancedb You will get this output:

🍹 Building a mixed python/rust project 🔗 Found pyo3 bindings with abi3 support 🐍 Found CPython 3.14t at /home/wxb24/code/cocoindex/.venv/bin/python 📡 Using build options features, bindings from pyproject.toml × No solution found when resolving dependencies: ╰─▶ Because only the following versions of lancedb are available: lancedb<=0.25.0 lancedb==0.25.1 lancedb==0.25.2 lancedb==0.25.3 and lancedb>=0.25.0 has no wheels with a matching Python implementation tag (e.g., cp314), we can conclude that lancedb>=0.25.0 cannot be used. And because you require lancedb>=0.25.0, we can conclude that your requirements are unsatisfiable.

  hint: You require CPython 3.14 (`cp314`), but we only found wheels for `lancedb` (v0.25.3) with the following Python implementation tag: `cp39`

💥 maturin failed Caused by: uv pip install finished with "exit status: 1"

lancedb is an optional dependency. It's not required to run cocoindex.

Can we enable 3.14 free-threaded whenever lancedb is not enabled?

georgeh0 avatar Nov 27 '25 22:11 georgeh0