From 7fd70d103e303d35b44d59679904fc346b95d9eb Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Tue, 17 Aug 2021 13:57:27 +0100 Subject: [PATCH] pytuple: deprecate split_from --- CHANGELOG.md | 1 + src/types/tuple.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index af6be1f0f59..81c01b70899 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed - Change `PyErr::fetch()` to return `Option`. [#1717](https://github.com/PyO3/pyo3/pull/1717) +- Deprecate `PyTuple::split_from`. [#1804](https://github.com/PyO3/pyo3/pull/1804) ### Fixed diff --git a/src/types/tuple.rs b/src/types/tuple.rs index d80b64780f5..2b020a56ba3 100644 --- a/src/types/tuple.rs +++ b/src/types/tuple.rs @@ -72,6 +72,7 @@ impl PyTuple { } } + #[deprecated(since = "0.15.0", note = "use tuple.slice(low, tuple.len()) instead")] /// Takes a slice of the tuple from `low` to the end and returns it as a new tuple. pub fn split_from(&self, low: usize) -> &PyTuple { unsafe {