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 <mail@davidhewitt.dev>
This commit is contained in:
parent
57bbc32e7c
commit
d35f41e0bf
|
@ -19,6 +19,9 @@
|
|||
//! # Example: Convert a `datetime.datetime` to chrono's `DateTime<Utc>`
|
||||
//!
|
||||
//! ```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;
|
||||
|
|
Loading…
Reference in New Issue