From 673d8d9fe103e3d402f3a74d11abd89a3420fcd1 Mon Sep 17 00:00:00 2001 From: jadedpasta Date: Wed, 10 Jan 2024 01:03:59 -0600 Subject: [PATCH] Avoid unused import for `PyModuleDef` when `not(Py_3_11)` --- pyo3-ffi/src/cpython/object.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyo3-ffi/src/cpython/object.rs b/pyo3-ffi/src/cpython/object.rs index 25e725eba42..8862f51bdff 100644 --- a/pyo3-ffi/src/cpython/object.rs +++ b/pyo3-ffi/src/cpython/object.rs @@ -1,6 +1,8 @@ #[cfg(Py_3_8)] use crate::vectorcallfunc; -use crate::{object, PyGetSetDef, PyMemberDef, PyMethodDef, PyModuleDef, PyObject, Py_ssize_t}; +#[cfg(all(not(PyPy), Py_3_11))] +use crate::PyModuleDef; +use crate::{object, PyGetSetDef, PyMemberDef, PyMethodDef, PyObject, Py_ssize_t}; use std::mem; use std::os::raw::{c_char, c_int, c_uint, c_ulong, c_void};