diff --git a/CHANGELOG.md b/CHANGELOG.md index 39cddd34..dc084010 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix case where `ValueError` without message could be raised by the `#[derive(FromPyObject)]` generated implementation for a tuple struct. [#2414](https://github.com/PyO3/pyo3/pull/2414) - Fix compile failure when using `#[pyo3(from_py_with = "pouf")]` in on a field in a `#[derive(FromPyObject)]` struct. [#2414](https://github.com/PyO3/pyo3/pull/2414) - Fix FFI definitions `_PyDateTime_BaseTime` lacking leading underscores in their names. [#2421](https://github.com/PyO3/pyo3/pull/2421) +- Remove FFI definition `PyArena` on Python 3.10 and up. [#2421](https://github.com/PyO3/pyo3/pull/2421) ## [0.16.5] - 2022-05-15 diff --git a/pyo3-ffi/src/lib.rs b/pyo3-ffi/src/lib.rs index 9eabd846..7033c37e 100644 --- a/pyo3-ffi/src/lib.rs +++ b/pyo3-ffi/src/lib.rs @@ -316,7 +316,7 @@ pub use self::moduleobject::*; pub use self::object::*; pub use self::objimpl::*; pub use self::osmodule::*; -#[cfg(not(Py_LIMITED_API))] +#[cfg(not(any(Py_LIMITED_API, Py_3_10)))] pub use self::pyarena::*; pub use self::pycapsule::*; pub use self::pyerrors::*; @@ -399,7 +399,7 @@ mod osmodule; // skipped picklebufobject.h // skipped pyctype.h // skipped py_curses.h -#[cfg(not(Py_LIMITED_API))] +#[cfg(not(any(Py_LIMITED_API, Py_3_10)))] mod pyarena; mod pycapsule; // skipped pydecimal.h diff --git a/src/marker.rs b/src/marker.rs index 79b5489f..6c27833b 100644 --- a/src/marker.rs +++ b/src/marker.rs @@ -184,7 +184,7 @@ mod negative_impls { impl !Ungil for crate::ffi::PyCodeObject {} #[cfg(not(Py_LIMITED_API))] impl !Ungil for crate::ffi::PyDictKeysObject {} - #[cfg(not(Py_LIMITED_API))] + #[cfg(not(any(Py_LIMITED_API, Py_3_10)))] impl !Ungil for crate::ffi::PyArena {} }