Skip to content

Commit 32a552a

Browse files
committed
Add version information to all deprecations and update a FIXME comment with a conrete version.
1 parent 28ec322 commit 32a552a

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

src/array.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,7 @@ impl<T: Element> PyArray<T, Ix1> {
10401040
/// });
10411041
/// ```
10421042
#[deprecated(
1043+
since = "0.17.0",
10431044
note = "`from_exact_iter` is deprecated as it does not provide any benefit over `from_iter`."
10441045
)]
10451046
#[inline(always)]

src/borrow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ fn gcd_strides(strides: &[isize]) -> isize {
739739
reduce(strides.iter().copied(), gcd).unwrap_or(1)
740740
}
741741

742-
// FIXME(adamreichold): Use `usize::abs_diff` from std when that becomes stable.
742+
// FIXME(adamreichold): Use `usize::abs_diff` from std when our MSRV reaches 1.60.
743743
fn abs_diff(lhs: usize, rhs: usize) -> usize {
744744
if lhs >= rhs {
745745
lhs - rhs

src/dtype.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ impl PyArrayDescr {
146146
}
147147

148148
#[doc(hidden)]
149-
#[deprecated(note = "`get_type()` is deprecated, please use `typeobj()` instead")]
149+
#[deprecated(
150+
since = "0.16.0",
151+
note = "`get_type()` is deprecated, please use `typeobj()` instead"
152+
)]
150153
pub fn get_type(&self) -> &PyType {
151154
self.typeobj()
152155
}

src/npyiter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
//!
1515
//! [iterator]: https://numpy.org/doc/stable/reference/c-api/iterator.html
1616
#![deprecated(
17+
since = "0.16.0",
1718
note = "The wrappers of the array iterator API are deprecated, please use ndarray's iterators like `Lanes` and `Zip` instead."
1819
)]
1920
#![allow(missing_debug_implementations)]

0 commit comments

Comments
 (0)