Skip to content

Commit 26266ee

Browse files
committed
Restored deprecation warning for IntoPyArray::into_pyarray and ToPyArray::to_pyarray
1 parent 690f06c commit 26266ee

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/convert.rs

+8
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ pub trait IntoPyArray: Sized {
4141
type Dim: Dimension;
4242

4343
/// Deprecated form of [`IntoPyArray::into_pyarray_bound`]
44+
#[deprecated(
45+
since = "0.21.0",
46+
note = "will be replaced by `IntoPyArray::into_pyarray_bound` in the future"
47+
)]
4448
#[cfg(feature = "gil-refs")]
4549
fn into_pyarray<'py>(self, py: Python<'py>) -> &'py PyArray<Self::Item, Self::Dim> {
4650
Self::into_pyarray_bound(self, py).into_gil_ref()
@@ -149,6 +153,10 @@ pub trait ToPyArray {
149153
type Dim: Dimension;
150154

151155
/// Deprecated form of [`ToPyArray::to_pyarray_bound`]
156+
#[deprecated(
157+
since = "0.21.0",
158+
note = "will be replaced by `ToPyArray::to_pyarray_bound` in the future"
159+
)]
152160
#[cfg(feature = "gil-refs")]
153161
fn to_pyarray<'py>(&self, py: Python<'py>) -> &'py PyArray<Self::Item, Self::Dim> {
154162
Self::to_pyarray_bound(self, py).into_gil_ref()

0 commit comments

Comments
 (0)