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

Relax indexmap dependency #2849

Merged
merged 1 commit into from
Jan 2, 2023
Merged

Relax indexmap dependency #2849

merged 1 commit into from
Jan 2, 2023

Conversation

gnaaman-dn
Copy link
Contributor

@gnaaman-dn gnaaman-dn commented Jan 1, 2023

Halloo,

Noticed some version resolve errors when trying to use the indexmap features.

❯ cargo add pyo3 --features indexmap
❯ cargo add serde_yaml
    Updating crates.io index
      Adding serde_yaml v0.9.16 to dependencies.
error: failed to select a version for `indexmap`.
    ... required by package `pyo3 v0.17.3`
    ... which satisfies dependency `pyo3 = "^0.17.3"` of package `pyo3-indexmap v0.1.0 (/home/dn/repos/pyo3-indexmap)`
versions that meet the requirements `>=1.6, <1.8` are: 1.7.0, 1.6.2, 1.6.1, 1.6.0

all possible versions conflict with previously selected packages.

  previously selected package `indexmap v1.9.0`
    ... which satisfies dependency `indexmap = "^1.9"` of package `serde_yaml v0.9.16`
    ... which satisfies dependency `serde_yaml = "^0.9.16"` of package `pyo3-indexmap v0.1.0 (/home/dn/repos/pyo3-indexmap)`

failed to select a version for `indexmap` which could resolve this conflict

Couldn't find a specific reason for this limitation so I tried upgrading the dependency and running the tests.
Ran the tests locally with indexmap==v1.9.2:

❯ cargo test --features indexmap conversions::indexmap
...
running 4 tests
test conversions::indexmap::test_indexmap::test_indexmap_indexmap_insertion_order_round_trip ... ok
test conversions::indexmap::test_indexmap::test_indexmap_indexmap_to_python ... ok
test conversions::indexmap::test_indexmap::test_indexmap_indexmap_into_python ... ok
test conversions::indexmap::test_indexmap::test_indexmap_indexmap_into_dict ... ok

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 536 filtered out; finished in 0.03s

(Tried running cargo xtask ci but it failed on some warnings in the generated FFI code)

This relaxes the restrictions on indexmap so that the latest version is also supported,
hope that's okay.

Cheers,
Gilad

Cargo.toml Outdated Show resolved Hide resolved
@adamreichold
Copy link
Member

As the CI indicates, this does indeed need a news fragment describing the change, c.f. https://github.com/PyO3/pyo3/blob/main/Contributing.md#documenting-changes.

@adamreichold
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 2, 2023

Build succeeded!

And happy new year! 🎉

@bors bors bot merged commit 57d188b into PyO3:main Jan 2, 2023
@renovate renovate bot mentioned this pull request Jun 6, 2023
1 task
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.

2 participants