From 9b860fa7fe2ef2c7320260ddcc5e5e51dfa5a960 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Tue, 25 Feb 2025 13:24:25 +0000 Subject: [PATCH] bump to PyO3 0.23.5, support PyPy 3.11 --- .github/workflows/ci.yml | 8 ++++---- Cargo.lock | 20 ++++++++++---------- Cargo.toml | 6 +++--- src/argument_markers.rs | 7 +------ 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a134ff801..72cf0ac9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -422,7 +422,7 @@ jobs: - os: linux manylinux: auto target: x86_64 - interpreter: pypy3.9 pypy3.10 + interpreter: pypy3.9 pypy3.10 pypy3.11 # musllinux - os: linux @@ -442,7 +442,7 @@ jobs: target: x86_64 - os: macos target: aarch64 - interpreter: 3.9 pypy3.9 pypy3.10 + interpreter: 3.9 pypy3.9 pypy3.10 pypy3.11 # windows; # x86_64 pypy builds are not PGO optimized @@ -450,7 +450,7 @@ jobs: # aarch64 only 3.11 and up, also not PGO optimized - os: windows target: x86_64 - interpreter: pypy3.9 pypy3.10 + interpreter: pypy3.9 pypy3.10 pypy3.11 - os: windows target: i686 python-architecture: x86 @@ -484,7 +484,7 @@ jobs: with: target: ${{ matrix.target }} manylinux: ${{ matrix.manylinux }} - args: --release --out dist --interpreter ${{ matrix.interpreter || '3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10' }} + args: --release --out dist --interpreter ${{ matrix.interpreter || '3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10 pypy3.11' }} rust-toolchain: stable docker-options: -e CI diff --git a/Cargo.lock b/Cargo.lock index 42b1220ea..ba2992d59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -449,9 +449,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fe09249128b3173d092de9523eaa75136bf7ba85e0d69eca241c7939c933cc" +checksum = "7778bffd85cf38175ac1f545509665d0b9b92a198ca7941f131f85f7a4f9a872" dependencies = [ "cfg-if", "indoc", @@ -468,9 +468,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd3927b5a78757a0d71aa9dff669f903b1eb64b54142a9bd9f757f8fde65fd7" +checksum = "94f6cbe86ef3bf18998d9df6e0f3fc1050a8c5efa409bf712e661a4366e010fb" dependencies = [ "once_cell", "python3-dll-a", @@ -479,9 +479,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dab6bb2102bd8f991e7749f130a70d05dd557613e39ed2deeee8e9ca0c4d548d" +checksum = "e9f1b4c431c0bb1c8fb0a338709859eed0d030ff6daa34368d3b152a63dfdd8d" dependencies = [ "libc", "pyo3-build-config", @@ -489,9 +489,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91871864b353fd5ffcb3f91f2f703a22a9797c91b9ab497b1acac7b07ae509c7" +checksum = "fbc2201328f63c4710f68abdf653c89d8dbc2858b88c5d88b0ff38a75288a9da" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -501,9 +501,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43abc3b80bc20f3facd86cd3c60beed58c3e2aa26213f3cda368de39c60a27e4" +checksum = "fca6726ad0f3da9c9de093d6f116a93c1a38e417ed73bf138472cf4064f72028" dependencies = [ "heck", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 6f8842bea..c7be6ad02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ rust-version = "1.75" [dependencies] # TODO it would be very nice to remove the "py-clone" feature as it can panic, # but needs a bit of work to make sure it's not used in the codebase -pyo3 = { version = "0.23.4", features = ["generate-import-lib", "num-bigint", "py-clone"] } +pyo3 = { version = "0.23.5", features = ["generate-import-lib", "num-bigint", "py-clone"] } regex = "1.11.1" strum = { version = "0.26.3", features = ["derive"] } strum_macros = "0.26.4" @@ -73,12 +73,12 @@ debug = true strip = false [dev-dependencies] -pyo3 = { version = "0.23.3", features = ["auto-initialize"] } +pyo3 = { version = "0.23.5", features = ["auto-initialize"] } [build-dependencies] version_check = "0.9.5" # used where logic has to be version/distribution specific, e.g. pypy -pyo3-build-config = { version = "0.23.3" } +pyo3-build-config = { version = "0.23.5" } [lints.clippy] dbg_macro = "warn" diff --git a/src/argument_markers.rs b/src/argument_markers.rs index 1b74a62f1..f22a32c78 100644 --- a/src/argument_markers.rs +++ b/src/argument_markers.rs @@ -5,12 +5,7 @@ use pyo3::types::{PyDict, PyTuple}; use crate::tools::safe_repr; -// see https://github.com/PyO3/pyo3/issues/4894 - freelist is currently unsound with GIL disabled -#[cfg_attr( - not(Py_GIL_DISABLED), - pyclass(module = "pydantic_core._pydantic_core", get_all, frozen, freelist = 100) -)] -#[cfg_attr(Py_GIL_DISABLED, pyclass(module = "pydantic_core._pydantic_core", get_all, frozen))] +#[pyclass(module = "pydantic_core._pydantic_core", get_all, frozen, freelist = 100)] #[derive(Debug, Clone)] pub struct ArgsKwargs { pub(crate) args: Py,