From 6c3a241dd458e9242ce344917921f87a92f3c083 Mon Sep 17 00:00:00 2001 From: Nicholas Sim Date: Mon, 28 Dec 2020 20:55:23 +0800 Subject: [PATCH] ffi cleanup: add missing deprecation --- src/ffi/descrobject.rs | 1 + src/pyclass.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/ffi/descrobject.rs b/src/ffi/descrobject.rs index 211eb15e..0709e332 100644 --- a/src/ffi/descrobject.rs +++ b/src/ffi/descrobject.rs @@ -71,6 +71,7 @@ extern "C" { /// Helper initial value of [`PyGetSetDef`] for a Python class. /// /// Not present in `cpython/Include/descrobject`. +#[deprecated(note = "not present in Python headers; to be removed")] pub const PyGetSetDef_INIT: PyGetSetDef = PyGetSetDef { name: ptr::null_mut(), get: None, diff --git a/src/pyclass.rs b/src/pyclass.rs index 164d1580..1a9cd96e 100644 --- a/src/pyclass.rs +++ b/src/pyclass.rs @@ -333,6 +333,7 @@ fn py_class_method_defs() -> ( (new, call, defs) } +#[allow(deprecated)] fn py_class_properties() -> Vec { let mut defs = std::collections::HashMap::new();