From 5e5bed649c2a34f0dd06101c7eb9e16f9ee78521 Mon Sep 17 00:00:00 2001 From: Icxolu <10486322+Icxolu@users.noreply.github.com> Date: Fri, 1 Mar 2024 22:38:25 +0100 Subject: [PATCH] move `PyCell` deprecation to the `gil-refs` feature gate and add a migration note --- src/pycell.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pycell.rs b/src/pycell.rs index 4fe93941e87..2c1aee788c5 100644 --- a/src/pycell.rs +++ b/src/pycell.rs @@ -267,7 +267,13 @@ unsafe impl PyLayout for PyCellBase where U: PySizedLayout {} /// ``` /// For more information on how, when and why (not) to use `PyCell` please see the /// [module-level documentation](self). -#[deprecated(since = "0.21.0")] +#[cfg_attr( + not(feature = "gil-refs"), + deprecated( + since = "0.21.0", + note = "`PyCell` was merged into `Bound`, use that instead; see the migration guide for more info" + ) +)] #[repr(C)] pub struct PyCell { ob_base: ::LayoutAsBase,