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

Bump PyO3 to 0.21.0? #119

Open
reswqa opened this issue Mar 27, 2024 · 1 comment · May be fixed by #121
Open

Bump PyO3 to 0.21.0? #119

reswqa opened this issue Mar 27, 2024 · 1 comment · May be fixed by #121

Comments

@reswqa
Copy link

reswqa commented Mar 27, 2024

Since PyO3 0.21.0 has been released and has a big performance improvement.

Many downstream projects will upgrade to the latest version of PyO3. Take opendal(has both pyo3 and pyo3-asyncio dependencies) as an example, I manage to bump it's dependency of pyo3 to 0.21, but get an error:

error: failed to select a version for `pyo3-ffi`.
    ... required by package `pyo3 v0.20.0`
    ... which satisfies dependency `pyo3 = "^0.20"` of package `pyo3-asyncio v0.20.0`
    ... which satisfies dependency `pyo3-asyncio = "^0.20"` of package `opendal-python v0.45.1 (xxx/opendal/bindings/python)`
versions that meet the requirements `=0.20.0` are: 0.20.0

the package `pyo3-ffi` links to the native library `python`, but it conflicts with a previous package which links to `python` as well:
package `pyo3-ffi v0.21.0`
    ... which satisfies dependency `pyo3-ffi = "=0.21.0"` of package `pyo3 v0.21.0`
    ... which satisfies dependency `pyo3 = "^0.21.0"` of package `opendal-python v0.45.1 (xxx/opendal/bindings/python)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the `links = "python"` value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for `pyo3-ffi` which could resolve this conflict

IIUC, this means pyo3-asyncio should bump pyo3 to 0.21 first.

@davidhewitt
Copy link

While waiting for a permanent decision on what to do, I've published https://crates.io/crates/pyo3-asyncio-0-21 from a fork at https://github.com/davidhewitt/pyo3-asyncio

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 a pull request may close this issue.

2 participants