From 1fca351d033a547115d8b51c4bf0d3529ceefed2 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Tue, 14 Nov 2023 00:59:45 +0100 Subject: [PATCH] Update to version 0.20.0; Fixes RHBZ#2243412 --- .gitignore | 1 + ...with-missing-send_wrapper-dependency.patch | 26 +++++++++---------- pyo3-fix-metadata.diff | 16 ++++++------ rust-pyo3.spec | 15 ++++++----- sources | 2 +- 5 files changed, 32 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index a5af4c9..886f8a4 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /pyo3-0.18.3.crate /pyo3-0.19.1.crate /pyo3-0.19.2.crate +/pyo3-0.20.0.crate diff --git a/0001-ignore-doctests-with-missing-send_wrapper-dependency.patch b/0001-ignore-doctests-with-missing-send_wrapper-dependency.patch index deb790a..da22aa5 100644 --- a/0001-ignore-doctests-with-missing-send_wrapper-dependency.patch +++ b/0001-ignore-doctests-with-missing-send_wrapper-dependency.patch @@ -1,6 +1,6 @@ -From 1a011b0266117687ff2b2d2de588064af964b968 Mon Sep 17 00:00:00 2001 +From 36f1b42e44f2cd2cfc3e14b0a4ab7c5cf9904bf7 Mon Sep 17 00:00:00 2001 From: Fabio Valentini -Date: Wed, 5 Jul 2023 19:13:56 +0200 +Date: Tue, 14 Nov 2023 00:51:33 +0100 Subject: [PATCH] ignore doctests with missing send_wrapper dependency --- @@ -8,7 +8,7 @@ Subject: [PATCH] ignore doctests with missing send_wrapper dependency 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/marker.rs b/src/marker.rs -index e5b3ed8..343bbb4 100644 +index dfe876c..1352276 100644 --- a/src/marker.rs +++ b/src/marker.rs @@ -66,7 +66,7 @@ @@ -20,7 +20,7 @@ index e5b3ed8..343bbb4 100644 //! use pyo3::prelude::*; //! use pyo3::types::PyString; //! use send_wrapper::SendWrapper; -@@ -158,7 +158,7 @@ use std::os::raw::c_int; +@@ -157,7 +157,7 @@ use std::os::raw::c_int; /// This also implies that the interplay between `with_gil` and `allow_threads` is unsound, for example /// one can circumvent this protection using the [`send_wrapper`](https://docs.rs/send_wrapper/) crate: /// @@ -29,15 +29,15 @@ index e5b3ed8..343bbb4 100644 /// # use pyo3::prelude::*; /// # use pyo3::types::PyString; /// use send_wrapper::SendWrapper; -@@ -225,7 +225,7 @@ unsafe impl Ungil for T {} - /// On nightly Rust, this is not based on the [`Send`] auto trait and hence we are able - /// to prevent incorrectly circumventing it using e.g. the [`send_wrapper`](https://docs.rs/send_wrapper/) crate: - /// --/// ```compile_fail -+/// ```ignore - /// # use pyo3::prelude::*; - /// # use pyo3::types::PyString; - /// use send_wrapper::SendWrapper; +@@ -231,7 +231,7 @@ mod nightly { + /// On nightly Rust, this is not based on the [`Send`] auto trait and hence we are able + /// to prevent incorrectly circumventing it using e.g. the [`send_wrapper`](https://docs.rs/send_wrapper/) crate: + /// +- /// ```compile_fail ++ /// ```ignore + /// # use pyo3::prelude::*; + /// # use pyo3::types::PyString; + /// use send_wrapper::SendWrapper; -- 2.41.0 diff --git a/pyo3-fix-metadata.diff b/pyo3-fix-metadata.diff index 8dbb4f9..fb7e5ee 100644 --- a/pyo3-fix-metadata.diff +++ b/pyo3-fix-metadata.diff @@ -1,8 +1,8 @@ ---- pyo3-0.19.2/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ pyo3-0.19.2/Cargo.toml 2023-08-01T13:22:43.767928+00:00 -@@ -151,9 +151,6 @@ - [dev-dependencies.rustversion] - version = "1.0" +--- pyo3-0.20.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ pyo3-0.20.0/Cargo.toml 2023-11-13T23:46:49.379610+00:00 +@@ -149,9 +149,6 @@ + version = "1.8.0" + features = ["std"] -[dev-dependencies.send_wrapper] -version = "0.6" @@ -10,7 +10,7 @@ [dev-dependencies.serde] version = "1.0" features = ["derive"] -@@ -163,9 +160,6 @@ +@@ -161,9 +158,6 @@ [dev-dependencies.trybuild] version = ">=1.0.70" @@ -19,8 +19,8 @@ -version = "0.5.1" [build-dependencies.pyo3-build-config] - version = "0.19.2" -@@ -219,7 +213,6 @@ + version = "0.20.0" +@@ -217,7 +211,6 @@ "experimental-inspect", "rust_decimal", ] diff --git a/rust-pyo3.spec b/rust-pyo3.spec index 91d7abf..6ba8d13 100644 --- a/rust-pyo3.spec +++ b/rust-pyo3.spec @@ -1,15 +1,15 @@ -# Generated by rust2rpm 24 +# Generated by rust2rpm 25 %bcond_without check %global debug_package %{nil} %global crate pyo3 Name: rust-pyo3 -Version: 0.19.2 +Version: 0.20.0 Release: %autorelease Summary: Bindings to Python interpreter -License: Apache-2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/pyo3 Source: %{crates_source} # Manually created patch for downstream crate metadata changes @@ -19,7 +19,7 @@ Patch: pyo3-fix-metadata.diff # * skip the single doctest that depends on send_wrapper Patch: 0001-ignore-doctests-with-missing-send_wrapper-dependency.patch -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Bindings to Python interpreter.} @@ -36,7 +36,10 @@ This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel -%license %{crate_instdir}/LICENSE +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%license %{crate_instdir}/pyo3-runtime/LICENSE-APACHE +%license %{crate_instdir}/pyo3-runtime/LICENSE-MIT %doc %{crate_instdir}/Architecture.md %doc %{crate_instdir}/CHANGELOG.md %doc %{crate_instdir}/Code-of-Conduct.md @@ -370,7 +373,7 @@ use the "unindent" feature of the "%{crate}" crate. %ghost %{crate_instdir}/Cargo.toml %prep -%autosetup -n %{crate}-%{version_no_tilde} -p1 +%autosetup -n %{crate}-%{version} -p1 # drop files that are not useful rm -r emscripten/ newsfragments/ # drop the tests for which dependencies were removed diff --git a/sources b/sources index 83fcc65..d4cdab5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pyo3-0.19.2.crate) = 58698183e0f2f0507f8f765bf3e90185c933e78d62f0a9be65c4b1ce8eea19a98fe0341abe7c58cafdacb63a012ec417876dccb7be6facc1360fcb22796fcaf9 +SHA512 (pyo3-0.20.0.crate) = 85d9533c75f905752c62f6a4898582ae48daf085e287b44949c47260301205a5f00477927877ce46300d2801d22fbc04a958c058a37eb28374c834fff27feca1