From d35f41e0bf158911efc844652683ee615c0f1d16 Mon Sep 17 00:00:00 2001 From: Thomas Tanon Date: Wed, 6 Mar 2024 18:49:43 +0100 Subject: [PATCH] Chrono: allow deprecation warning until upgrading to 0.4.35+ (#3935) * Chrono: allow deprecation warning until upgrading to 0.4.35+ Requiring 0.4.35 is blocked on MSRV (Chrono: 1.61, PyO3: 1.56) * also allow deprecated chrono in example --------- Co-authored-by: David Hewitt --- src/conversions/chrono.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/conversions/chrono.rs b/src/conversions/chrono.rs index 134724b2..2e46a9e5 100644 --- a/src/conversions/chrono.rs +++ b/src/conversions/chrono.rs @@ -19,6 +19,9 @@ //! # Example: Convert a `datetime.datetime` to chrono's `DateTime` //! //! ```rust +//! # // `chrono::Duration` has been renamed to `chrono::TimeDelta` and its constructors changed +//! # // TODO: upgrade to Chrono 0.4.35+ after upgrading our MSRV to 1.61+ +//! # #![allow(deprecated)] //! use chrono::{DateTime, Duration, TimeZone, Utc}; //! use pyo3::{Python, ToPyObject}; //! @@ -39,6 +42,11 @@ //! }); //! } //! ``` + +// `chrono::Duration` has been renamed to `chrono::TimeDelta` and its constructors changed +// TODO: upgrade to Chrono 0.4.35+ after upgrading our MSRV to 1.61+ +#![allow(deprecated)] + use crate::exceptions::{PyTypeError, PyUserWarning, PyValueError}; #[cfg(Py_LIMITED_API)] use crate::sync::GILOnceCell;