add missing deprecation for `PyDict::from_sequence` (#3884)

This commit is contained in:
Icxolu 2024-02-22 23:52:25 +01:00 committed by GitHub
parent 4f8ee96881
commit 8bd82da939
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -75,6 +75,13 @@ impl PyDict {
}
/// Deprecated form of [`from_sequence_bound`][PyDict::from_sequence_bound].
#[cfg_attr(
all(not(PyPy), not(feature = "gil-refs")),
deprecated(
since = "0.21.0",
note = "`PyDict::from_sequence` will be replaced by `PyDict::from_sequence_bound` in a future PyO3 version"
)
)]
#[inline]
#[cfg(not(PyPy))]
pub fn from_sequence(seq: &PyAny) -> PyResult<&PyDict> {