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

Fix build - update arrow to 54.2.1 #291

Closed
wants to merge 1 commit into from

Conversation

legendre6891
Copy link

Arrow 54.2.0 is broken and a hotfix 54.2.1 was issued.

Without bumping the arrow version, this package does not build by default.

$ cargo new --lib tmp
$ cd tmp
$ cargo add pyo3-arrow
$ cargo build

-- snip --
error[E0034]: multiple applicable items in scope
92  |         DatePart::Quarter => |d| d.quarter() as i32,
    |                                    ^^^^^^^ multiple `quarter` found
    |
note: candidate #1 is defined in the trait `ChronoDateExt`
-- snip --

Upgrade to the hotfix version 54.2.1
@kylebarron
Copy link
Owner

kylebarron commented Mar 4, 2025

Can't you pin to 54.2.1 in your own code? pyo3-arrow is set to 54 for the arrow dependency, which means that it's semver compatible with 54.2.1. I don't want to bump to 54.2.1 because that means this library would no longer be compatible for anyone still using 54.0 or 54.1.

@legendre6891
Copy link
Author

You’re right, I could indeed add an explicit requirement in my own project.

The point of this PR is to highlight that a library whose only specified dependency is pyo3-arrow cannot be built. I think this is worth fixing.

That said, I hear you on the compatibility considerations for users of arrow 54.0/54.1. Perhaps the onus is on arrow to pull 54.2.

@kylebarron
Copy link
Owner

You’re right, I could indeed add an explicit requirement in my own project.

I'm not sure how to use pyo3-arrow without a dependency on arrow in your own project... pyo3-arrow only gives you the Python I/O, but you still need arrow to do anything with the data in Rust.

The point of this PR is to highlight that a library whose only specified dependency is pyo3-arrow cannot be built. I think this is worth fixing.

Interesting... this seems to be something specific with the cargo resolver. When I don't pin 54.2.1 specifically, it does downgrade arrow to 54.2.0:
image

Perhaps chrono has higher priority for some reason?

Ideally I would change this to:

arrow = "54,!=54.2.0"

So that any 54.* version is allowed except 54.2.0, but Cargo does not allow this.

So I don't think there's anything we can realistically do here if we want to still support users on 54.0 and 54.1.

@legendre6891 legendre6891 deleted the patch-1 branch March 5, 2025 00:41
@legendre6891
Copy link
Author

Agreed -- probably nothing we could do for now -- it would be best if the hypothetical arrow = "54,!=54.2.0" were supported.

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