diff --git a/src/impl_/pyclass.rs b/src/impl_/pyclass.rs index 07bdb97ea4c..a1a55a36f56 100644 --- a/src/impl_/pyclass.rs +++ b/src/impl_/pyclass.rs @@ -1116,7 +1116,7 @@ impl PyClassThreadChecker for ThreadCheckerImpl { /// Trait denoting that this class is suitable to be used as a base type for PyClass. #[cfg_attr( - all(diagnostic_namespace, feature = "abi3"), + all(diagnostic_namespace, Py_LIMITED_API), diagnostic::on_unimplemented( note = "with the `abi3` feature enabled, PyO3 does not support subclassing native types" )