From 067c4b3f1374a036b5506cca7bb485358472ab37 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 fdc75f36de6..4c3a5fa1c7b 100644 --- a/src/pycell.rs +++ b/src/pycell.rs @@ -265,7 +265,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,