From ae95f69755237b373b3bfb2bf887b47cc78b0337 Mon Sep 17 00:00:00 2001 From: Joshua Rudolph Date: Sat, 5 Oct 2024 14:02:32 -0500 Subject: [PATCH] Restored deprecation warning for `IntoPyArray::into_pyarray` and `ToPyArray::to_pyarray` --- src/convert.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/convert.rs b/src/convert.rs index fa7b26d39..28296255b 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -41,6 +41,10 @@ pub trait IntoPyArray: Sized { type Dim: Dimension; /// Deprecated form of [`IntoPyArray::into_pyarray_bound`] + #[deprecated( + since = "0.21.0", + note = "will be replaced by `IntoPyArray::into_pyarray_bound` in the future" + )] #[cfg(feature = "gil-refs")] fn into_pyarray<'py>(self, py: Python<'py>) -> &'py PyArray { Self::into_pyarray_bound(self, py).into_gil_ref() @@ -149,6 +153,10 @@ pub trait ToPyArray { type Dim: Dimension; /// Deprecated form of [`ToPyArray::to_pyarray_bound`] + #[deprecated( + since = "0.21.0", + note = "will be replaced by `ToPyArray::to_pyarray_bound` in the future" + )] #[cfg(feature = "gil-refs")] fn to_pyarray<'py>(&self, py: Python<'py>) -> &'py PyArray { Self::to_pyarray_bound(self, py).into_gil_ref()