Failed to fetch wheel: tantivy==0.22.0 (Python 3.13.0)
os: MacOS 15.0.1 (24A348)
rustc: 1.81.0 (eeb90cda1 2024-09-04)
python: 3.13.0
pip: 24.2
$ uv pip install -r requirements/requirements-dev.txt
Resolved 157 packages in 1.48s
error: Failed to prepare distributions
Caused by: Failed to fetch wheel: tantivy==0.22.0
Caused by: Build backend failed to build wheel through `build_wheel()` with exit status: 1
--- stdout:
Running `maturin pep517 build-wheel -i /Users/foo/Library/Caches/uv/builds-v0/.tmpHCCrBh/bin/python --compatibility off`
--- stderr:
📦 Including license file "/Users/foo/Library/Caches/uv/built-wheels-v3/pypi/tantivy/0.22.0/Zb7PvPJPgL5AdGLS7FeGo/tantivy-0.22.0.tar.gz/LICENSE"
🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings
🐍 Found CPython 3.13 at /Users/foo/Library/Caches/uv/builds-v0/.tmpHCCrBh/bin/python
📡 Using build options bindings from pyproject.toml
💻 Using `MACOSX_DEPLOYMENT_TARGET=11.0` for aarch64-apple-darwin by default
Compiling pyo3-build-config v0.20.0
Compiling time v0.3.30
error[E0282]: type annotations needed for `Box<_>`
--> /Users/foo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.30/src/format_description/parse/mod.rs:83:9
|
83 | let items = format_items
| ^^^^^
...
86 | Ok(items.into())
| ---- type must be known at this point
|
= note: this is an inference error on crate `time` caused by an API change in Rust 1.80.0; update `time` to version `>=0.3.35` by calling `cargo update`
Compiling pyo3-ffi v0.20.0
Compiling pyo3 v0.20.0
Compiling tantivy v0.22.0 (/Users/foo/Library/Caches/uv/built-wheels-v3/pypi/tantivy/0.22.0/Zb7PvPJPgL5AdGLS7FeGo/tantivy-0.22.0.tar.gz)
For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
💥 maturin failed
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit status: 101": `MACOSX_DEPLOYMENT_TARGET="11.0" PYO3_ENVIRONMENT_SIGNATURE="cpython-3.13-64bit" PYO3_PYTHON="/Users/foo/Library/Caches/uv/builds-v0/.tmpHCCrBh/bin/python" PYTHON_SYS_EXECUTABLE="/Users/foo/Library/Caches/uv/builds-v0/.tmpHCCrBh/bin/python" "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/Users/foo/Library/Caches/uv/built-wheels-v3/pypi/tantivy/0.22.0/Zb7PvPJPgL5AdGLS7FeGo/tantivy-0.22.0.tar.gz/Cargo.toml" "--release" "--lib" "--" "-C" "link-arg=-undefined" "-C" "link-arg=dynamic_lookup" "-C" "link-args=-Wl,-install_name,@rpath/tantivy.cpython-313-darwin.so"`
Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/Users/foo/Library/Caches/uv/builds-v0/.tmpHCCrBh/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
@wallies Any chance we can get a wheel up for 3.13? If you're not able I can get to it next week.
@cjrh we need to upgrade pyo3 version to 0.22.0 as that has the support for python 3.13
Didn't https://github.com/quickwit-oss/tantivy-py/pull/390 take care of that? I am wondering if we can close this out
@jamesbraza no we need to update pyo3 https://github.com/quickwit-oss/tantivy-py/blob/master/Cargo.toml#L27 otherwise we get this error when releasing
--- stderr
error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
= help: please check if an updated version of PyO3 is available. Current version: 0.21.2
= help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
We could do like we have in CI build and use forward compatibility to supress the check but we cant guarantee things will work properly.
Okay, I made a PR to do this: https://github.com/quickwit-oss/tantivy-py/pull/401
Hm looks like https://github.com/PyO3/pyo3/pull/3916 broke things here. I tried a bunch of stuff tonight, but bottom line I don't know enough Rust/PyO3 to complete this one.
The closest I got was this in src/query.rs:
impl<'source> FromPyObject<'source> for OccurQueryPair {
--- fn extract(ob: &'source PyAny) -> PyResult<Self> {
--- let tuple = ob.downcast::<PyTuple>()?;
--- let occur = tuple.get_item(0)?.extract()?;
--- let query = tuple.get_item(1)?.extract()?;
+++ fn extract_bound(ob: &Bound<'source, PyAny>) -> PyResult<Self> {
+++ let (occur, query): (Occur, Query) = ob.extract()?;
Ok(OccurQueryPair(occur, query))
}
}
I just tested out https://github.com/quickwit-oss/tantivy-py/tree/ff027a20a062ef6eb196915c134f7ab1e844c5c1 with Python 3.13.2:
+ tantivy==0.22.2 (from git+https://github.com/quickwit-oss/tantivy-py.git@ff027a20a062ef6eb196915c134f7ab1e844c5c1)
The install worked and https://github.com/Future-House/paper-qa 's unit tests passed locally on my Mac ✅ . Python 3.13 support seems to be working 🥳 📈