Skip to content
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

Failed to fetch wheel: tantivy==0.22.0 (Python 3.13.0) #371

Open
mukeshsahnis opened this issue Oct 15, 2024 · 7 comments · May be fixed by #401
Open

Failed to fetch wheel: tantivy==0.22.0 (Python 3.13.0) #371

mukeshsahnis opened this issue Oct 15, 2024 · 7 comments · May be fixed by #401

Comments

@mukeshsahnis
Copy link
Contributor

mukeshsahnis commented Oct 15, 2024

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
@mukeshsahnis mukeshsahnis changed the title Failed to fetch wheel: tantivy==0.22.0 Failed to fetch wheel: tantivy==0.22.0 On (Python 3.13.0) Oct 15, 2024
@mukeshsahnis mukeshsahnis changed the title Failed to fetch wheel: tantivy==0.22.0 On (Python 3.13.0) Failed to fetch wheel: tantivy==0.22.0 (Python 3.13.0) Oct 15, 2024
@cjrh
Copy link
Collaborator

cjrh commented Oct 16, 2024

@wallies Any chance we can get a wheel up for 3.13? If you're not able I can get to it next week.

@wallies
Copy link
Collaborator

wallies commented Nov 24, 2024

@cjrh we need to upgrade pyo3 version to 0.22.0 as that has the support for python 3.13

@jamesbraza
Copy link

Didn't #390 take care of that? I am wondering if we can close this out

@wallies
Copy link
Collaborator

wallies commented Dec 17, 2024

@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.

@jamesbraza jamesbraza linked a pull request Dec 17, 2024 that will close this issue
@jamesbraza
Copy link

Okay, I made a PR to do this: #401

@jamesbraza
Copy link

jamesbraza commented Dec 17, 2024

Hm looks like PyO3/pyo3#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.

@jamesbraza
Copy link

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))
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants