From 677017db1e437d6c38d68abd2d83bbafe4c3885c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 22 Feb 2025 14:40:38 +0100 Subject: [PATCH 1/3] release: 0.23.5 --- CHANGELOG.md | 13 ++++++++++++- Cargo.toml | 8 ++++---- README.md | 4 ++-- examples/decorator/.template/pre-script.rhai | 2 +- examples/maturin-starter/.template/pre-script.rhai | 2 +- examples/plugin/.template/pre-script.rhai | 2 +- .../.template/pre-script.rhai | 2 +- examples/word-count/.template/pre-script.rhai | 2 +- newsfragments/4760.packaging.md | 1 - newsfragments/4879.fixed.md | 1 - newsfragments/4902.fixed.md | 1 - newsfragments/4921.fixed.md | 1 - pyo3-build-config/Cargo.toml | 2 +- pyo3-ffi/Cargo.toml | 4 ++-- pyo3-ffi/README.md | 4 ++-- pyo3-macros-backend/Cargo.toml | 6 +++--- pyo3-macros/Cargo.toml | 4 ++-- pyproject.toml | 2 +- tests/ui/reject_generics.stderr | 4 ++-- 19 files changed, 36 insertions(+), 29 deletions(-) delete mode 100644 newsfragments/4760.packaging.md delete mode 100644 newsfragments/4879.fixed.md delete mode 100644 newsfragments/4902.fixed.md delete mode 100644 newsfragments/4921.fixed.md diff --git a/CHANGELOG.md b/CHANGELOG.md index dfcf20e6fa3..815bf67e545 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,16 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h +## [0.23.5] - 2025-02-22 +### Packaging + +- add support for PyPy3.11 [#4760](https://github.com/PyO3/pyo3/pull/4760) + +### Fixed + +- * Fixed thread-unsafe implementation of freelist pyclasses on the free-threaded build. [#4902](https://github.com/PyO3/pyo3/pull/4902) +- * Reenabled a workaround for situations where CPython incorrectly does not add `__builtins__` to `__globals__` in code executed by `Python::py_run`. [#4921](https://github.com/PyO3/pyo3/pull/4921) + ## [0.23.4] - 2025-01-10 ### Added @@ -2054,7 +2064,8 @@ Yanked - Initial release -[Unreleased]: https://github.com/pyo3/pyo3/compare/v0.23.4...HEAD +[Unreleased]: https://github.com/pyo3/pyo3/compare/v0.23.5...HEAD +[0.23.4]: https://github.com/pyo3/pyo3/compare/v0.23.4...v0.23.5 [0.23.4]: https://github.com/pyo3/pyo3/compare/v0.23.3...v0.23.4 [0.23.3]: https://github.com/pyo3/pyo3/compare/v0.23.2...v0.23.3 [0.23.2]: https://github.com/pyo3/pyo3/compare/v0.23.1...v0.23.2 diff --git a/Cargo.toml b/Cargo.toml index 22c18228c44..a0855c6a49f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3" -version = "0.23.4" +version = "0.23.5" description = "Bindings to Python interpreter" authors = ["PyO3 Project and Contributors "] readme = "README.md" @@ -21,10 +21,10 @@ memoffset = "0.9" once_cell = "1.13" # ffi bindings to the python interpreter, split into a separate crate so they can be used independently -pyo3-ffi = { path = "pyo3-ffi", version = "=0.23.4" } +pyo3-ffi = { path = "pyo3-ffi", version = "=0.23.5" } # support crates for macros feature -pyo3-macros = { path = "pyo3-macros", version = "=0.23.4", optional = true } +pyo3-macros = { path = "pyo3-macros", version = "=0.23.5", optional = true } indoc = { version = "2.0.1", optional = true } unindent = { version = "0.2.1", optional = true } @@ -66,7 +66,7 @@ static_assertions = "1.1.0" uuid = {version = "1.10.0", features = ["v4"] } [build-dependencies] -pyo3-build-config = { path = "pyo3-build-config", version = "=0.23.4", features = ["resolve-config"] } +pyo3-build-config = { path = "pyo3-build-config", version = "=0.23.5", features = ["resolve-config"] } [features] default = ["macros"] diff --git a/README.md b/README.md index ece3524816f..6d94be02679 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ name = "string_sum" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.23.4", features = ["extension-module"] } +pyo3 = { version = "0.23.5", features = ["extension-module"] } ``` **`src/lib.rs`** @@ -140,7 +140,7 @@ Start a new project with `cargo new` and add `pyo3` to the `Cargo.toml` like th ```toml [dependencies.pyo3] -version = "0.23.4" +version = "0.23.5" features = ["auto-initialize"] ``` diff --git a/examples/decorator/.template/pre-script.rhai b/examples/decorator/.template/pre-script.rhai index a4e89a0d054..c403a167400 100644 --- a/examples/decorator/.template/pre-script.rhai +++ b/examples/decorator/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.23.4"); +variable::set("PYO3_VERSION", "0.23.5"); file::rename(".template/Cargo.toml", "Cargo.toml"); file::rename(".template/pyproject.toml", "pyproject.toml"); file::delete(".template"); diff --git a/examples/maturin-starter/.template/pre-script.rhai b/examples/maturin-starter/.template/pre-script.rhai index a4e89a0d054..c403a167400 100644 --- a/examples/maturin-starter/.template/pre-script.rhai +++ b/examples/maturin-starter/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.23.4"); +variable::set("PYO3_VERSION", "0.23.5"); file::rename(".template/Cargo.toml", "Cargo.toml"); file::rename(".template/pyproject.toml", "pyproject.toml"); file::delete(".template"); diff --git a/examples/plugin/.template/pre-script.rhai b/examples/plugin/.template/pre-script.rhai index 3a1392912ca..f958e1da13e 100644 --- a/examples/plugin/.template/pre-script.rhai +++ b/examples/plugin/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.23.4"); +variable::set("PYO3_VERSION", "0.23.5"); file::rename(".template/Cargo.toml", "Cargo.toml"); file::rename(".template/plugin_api/Cargo.toml", "plugin_api/Cargo.toml"); file::delete(".template"); diff --git a/examples/setuptools-rust-starter/.template/pre-script.rhai b/examples/setuptools-rust-starter/.template/pre-script.rhai index 6b93bf9e6d1..3e9f2a4a04d 100644 --- a/examples/setuptools-rust-starter/.template/pre-script.rhai +++ b/examples/setuptools-rust-starter/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.23.4"); +variable::set("PYO3_VERSION", "0.23.5"); file::rename(".template/Cargo.toml", "Cargo.toml"); file::rename(".template/setup.cfg", "setup.cfg"); file::delete(".template"); diff --git a/examples/word-count/.template/pre-script.rhai b/examples/word-count/.template/pre-script.rhai index a4e89a0d054..c403a167400 100644 --- a/examples/word-count/.template/pre-script.rhai +++ b/examples/word-count/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.23.4"); +variable::set("PYO3_VERSION", "0.23.5"); file::rename(".template/Cargo.toml", "Cargo.toml"); file::rename(".template/pyproject.toml", "pyproject.toml"); file::delete(".template"); diff --git a/newsfragments/4760.packaging.md b/newsfragments/4760.packaging.md deleted file mode 100644 index e7fe53099d1..00000000000 --- a/newsfragments/4760.packaging.md +++ /dev/null @@ -1 +0,0 @@ -add support for PyPy3.11 diff --git a/newsfragments/4879.fixed.md b/newsfragments/4879.fixed.md deleted file mode 100644 index 2ad659b0786..00000000000 --- a/newsfragments/4879.fixed.md +++ /dev/null @@ -1 +0,0 @@ - * fixed spurious `test_double` failures. diff --git a/newsfragments/4902.fixed.md b/newsfragments/4902.fixed.md deleted file mode 100644 index e377ab018d7..00000000000 --- a/newsfragments/4902.fixed.md +++ /dev/null @@ -1 +0,0 @@ -* Fixed thread-unsafe implementation of freelist pyclasses on the free-threaded build. \ No newline at end of file diff --git a/newsfragments/4921.fixed.md b/newsfragments/4921.fixed.md deleted file mode 100644 index 86a91fd727a..00000000000 --- a/newsfragments/4921.fixed.md +++ /dev/null @@ -1 +0,0 @@ -* Reenabled a workaround for situations where CPython incorrectly does not add `__builtins__` to `__globals__` in code executed by `Python::py_run`. \ No newline at end of file diff --git a/pyo3-build-config/Cargo.toml b/pyo3-build-config/Cargo.toml index cee4c3ad52b..bf672b95a27 100644 --- a/pyo3-build-config/Cargo.toml +++ b/pyo3-build-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-build-config" -version = "0.23.4" +version = "0.23.5" description = "Build configuration for the PyO3 ecosystem" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] diff --git a/pyo3-ffi/Cargo.toml b/pyo3-ffi/Cargo.toml index fe8b3b25513..3dd5a711eb6 100644 --- a/pyo3-ffi/Cargo.toml +++ b/pyo3-ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-ffi" -version = "0.23.4" +version = "0.23.5" description = "Python-API bindings for the PyO3 ecosystem" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -42,7 +42,7 @@ generate-import-lib = ["pyo3-build-config/python3-dll-a"] paste = "1" [build-dependencies] -pyo3-build-config = { path = "../pyo3-build-config", version = "=0.23.4", features = ["resolve-config"] } +pyo3-build-config = { path = "../pyo3-build-config", version = "=0.23.5", features = ["resolve-config"] } [lints] workspace = true diff --git a/pyo3-ffi/README.md b/pyo3-ffi/README.md index d220949a875..8224217c4e7 100644 --- a/pyo3-ffi/README.md +++ b/pyo3-ffi/README.md @@ -41,13 +41,13 @@ name = "string_sum" crate-type = ["cdylib"] [dependencies.pyo3-ffi] -version = "0.23.4" +version = "0.23.5" features = ["extension-module"] [build-dependencies] # This is only necessary if you need to configure your build based on # the Python version or the compile-time configuration for the interpreter. -pyo3_build_config = "0.23.4" +pyo3_build_config = "0.23.5" ``` If you need to use conditional compilation based on Python version or how diff --git a/pyo3-macros-backend/Cargo.toml b/pyo3-macros-backend/Cargo.toml index 704c263cb47..fced6a5d287 100644 --- a/pyo3-macros-backend/Cargo.toml +++ b/pyo3-macros-backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-macros-backend" -version = "0.23.4" +version = "0.23.5" description = "Code generation for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -17,7 +17,7 @@ rust-version = "1.63" [dependencies] heck = "0.5" proc-macro2 = { version = "1.0.60", default-features = false } -pyo3-build-config = { path = "../pyo3-build-config", version = "=0.23.4", features = ["resolve-config"] } +pyo3-build-config = { path = "../pyo3-build-config", version = "=0.23.5", features = ["resolve-config"] } quote = { version = "1", default-features = false } [dependencies.syn] @@ -26,7 +26,7 @@ default-features = false features = ["derive", "parsing", "printing", "clone-impls", "full", "extra-traits"] [build-dependencies] -pyo3-build-config = { path = "../pyo3-build-config", version = "=0.23.4" } +pyo3-build-config = { path = "../pyo3-build-config", version = "=0.23.5" } [lints] workspace = true diff --git a/pyo3-macros/Cargo.toml b/pyo3-macros/Cargo.toml index 55961376c79..3de7a556b0b 100644 --- a/pyo3-macros/Cargo.toml +++ b/pyo3-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-macros" -version = "0.23.4" +version = "0.23.5" description = "Proc macros for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -22,7 +22,7 @@ experimental-async = ["pyo3-macros-backend/experimental-async"] proc-macro2 = { version = "1.0.60", default-features = false } quote = "1" syn = { version = "2", features = ["full", "extra-traits"] } -pyo3-macros-backend = { path = "../pyo3-macros-backend", version = "=0.23.4" } +pyo3-macros-backend = { path = "../pyo3-macros-backend", version = "=0.23.5" } [lints] workspace = true diff --git a/pyproject.toml b/pyproject.toml index f74a09ed943..48a5e8a9747 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ [tool.towncrier] filename = "CHANGELOG.md" -version = "0.23.4" +version = "0.23.5" start_string = "\n" template = ".towncrier.template.md" title_format = "## [{version}] - {project_date}" diff --git a/tests/ui/reject_generics.stderr b/tests/ui/reject_generics.stderr index fa5359eeca5..850387aadd4 100644 --- a/tests/ui/reject_generics.stderr +++ b/tests/ui/reject_generics.stderr @@ -1,10 +1,10 @@ -error: #[pyclass] cannot have generic parameters. For an explanation, see https://pyo3.rs/v0.23.4/class.html#no-generic-parameters +error: #[pyclass] cannot have generic parameters. For an explanation, see https://pyo3.rs/v0.23.5/class.html#no-generic-parameters --> tests/ui/reject_generics.rs:4:25 | 4 | struct ClassWithGenerics { | ^ -error: #[pyclass] cannot have lifetime parameters. For an explanation, see https://pyo3.rs/v0.23.4/class.html#no-lifetime-parameters +error: #[pyclass] cannot have lifetime parameters. For an explanation, see https://pyo3.rs/v0.23.5/class.html#no-lifetime-parameters --> tests/ui/reject_generics.rs:9:27 | 9 | struct ClassWithLifetimes<'a> { From 688ad2ccc1a7714c2c44596f351625ed0ba0bd4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 22 Feb 2025 18:59:30 +0100 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Icxolu <10486322+Icxolu@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 815bf67e545..54f669369d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2065,7 +2065,7 @@ Yanked - Initial release [Unreleased]: https://github.com/pyo3/pyo3/compare/v0.23.5...HEAD -[0.23.4]: https://github.com/pyo3/pyo3/compare/v0.23.4...v0.23.5 +[0.23.5]: https://github.com/pyo3/pyo3/compare/v0.23.4...v0.23.5 [0.23.4]: https://github.com/pyo3/pyo3/compare/v0.23.3...v0.23.4 [0.23.3]: https://github.com/pyo3/pyo3/compare/v0.23.2...v0.23.3 [0.23.2]: https://github.com/pyo3/pyo3/compare/v0.23.1...v0.23.2 From 34a120bee6461f38903c7d1a69607db95398e05d Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Tue, 25 Feb 2025 12:21:08 +0000 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54f669369d9..b08db4d36d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,12 +13,12 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h ## [0.23.5] - 2025-02-22 ### Packaging -- add support for PyPy3.11 [#4760](https://github.com/PyO3/pyo3/pull/4760) +- Add support for PyPy3.11 [#4760](https://github.com/PyO3/pyo3/pull/4760) ### Fixed -- * Fixed thread-unsafe implementation of freelist pyclasses on the free-threaded build. [#4902](https://github.com/PyO3/pyo3/pull/4902) -- * Reenabled a workaround for situations where CPython incorrectly does not add `__builtins__` to `__globals__` in code executed by `Python::py_run`. [#4921](https://github.com/PyO3/pyo3/pull/4921) +- Fix thread-unsafe implementation of freelist pyclasses on the free-threaded build. [#4902](https://github.com/PyO3/pyo3/pull/4902) +- Re-enable a workaround for situations where CPython incorrectly does not add `__builtins__` to `__globals__` in code executed by `Python::py_run` (was removed in PyO3 0.23.0). [#4921](https://github.com/PyO3/pyo3/pull/4921) ## [0.23.4] - 2025-01-10