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

Way to spell TimeDelta::MIN on older chrono versions #1640

Closed
ngoldbaum opened this issue Dec 11, 2024 · 4 comments
Closed

Way to spell TimeDelta::MIN on older chrono versions #1640

ngoldbaum opened this issue Dec 11, 2024 · 4 comments

Comments

@ngoldbaum
Copy link

Over at PyO3/pyo3#4785 we're confused about how to update a test that uses min_value to not emit a deprecation warning on the newest chrono version but still be runnable on our minimum supported version. The suggestion in the deprecation message is only possible on the latest version of chrono.

@djc
Copy link
Member

djc commented Dec 11, 2024

Why do you have an older minimum version of chrono?

@ngoldbaum
Copy link
Author

We only use min_value() in a test, so it seems wrong to bump the minimum required version to fix a test. Would you just bump the minimum chrono version in PyO3's Cargo.toml for the chrono feature?

@djc
Copy link
Member

djc commented Dec 11, 2024

Yes, it doesn't seem like a big deal. Could go with 0.4.38 if that's new enough since 0.4.39 is relatively recent. Or just suppress the warning about deprecation in your test.

@ngoldbaum
Copy link
Author

Cool, we'll just do [allow(deprecated)] I think. Thanks for the advice!

@djc djc reopened this Dec 11, 2024
@djc djc closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2024
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

No branches or pull requests

2 participants