Skip to content

Commit

Permalink
Fix chrono deprecation warning (#4785)
Browse files Browse the repository at this point in the history
* Fix chrono deprecation warning

* use allow(deprecated) instead

---------

Co-authored-by: Nathan Goldbaum <[email protected]>
  • Loading branch information
bschoenmaeckers and ngoldbaum authored Dec 11, 2024
1 parent 992865b commit 926f5cf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/conversions/chrono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,12 @@ mod tests {

// Also check that trying to convert an out of bound value errors.
Python::with_gil(|py| {
assert!(Duration::min_value().into_pyobject(py).is_err());
assert!(Duration::max_value().into_pyobject(py).is_err());
// min_value and max_value were deprecated in chrono 0.4.39
#[allow(deprecated)]
{
assert!(Duration::min_value().into_pyobject(py).is_err());
assert!(Duration::max_value().into_pyobject(py).is_err());
}
});
}

Expand Down

0 comments on commit 926f5cf

Please sign in to comment.