From dd018f11c1e8840ba502abb408a2402f49cb62f4 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Tue, 16 Jul 2024 09:01:29 +0100 Subject: [PATCH] release: 0.22.2 --- CHANGELOG.md | 17 +++++++++++++++++ Cargo.toml | 8 ++++---- README.md | 4 ++-- examples/decorator/.template/pre-script.rhai | 2 +- .../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/4324.changed.md | 1 - newsfragments/4327.packaging.md | 3 --- newsfragments/4330.changed.md | 1 - newsfragments/4346.changed.md | 1 - newsfragments/4353.fixed.md | 1 - pyo3-build-config/Cargo.toml | 2 +- pyo3-ffi/Cargo.toml | 4 ++-- pyo3-macros-backend/Cargo.toml | 6 +++--- pyo3-macros/Cargo.toml | 4 ++-- pyproject.toml | 2 +- 18 files changed, 37 insertions(+), 27 deletions(-) delete mode 100644 newsfragments/4324.changed.md delete mode 100644 newsfragments/4327.packaging.md delete mode 100644 newsfragments/4330.changed.md delete mode 100644 newsfragments/4346.changed.md delete mode 100644 newsfragments/4353.fixed.md diff --git a/CHANGELOG.md b/CHANGELOG.md index beabedc28de..c0d612c2e75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,23 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h +## [0.22.2] - 2024-07-17 + +### Packaging + +- Require opt-in to freethreaded Python using the `UNSAFE_PYO3_BUILD_FREE_THREADED=1` environment variable (it is not yet supported by PyO3). [#4327](https://github.com/PyO3/pyo3/pull/4327) + +### Changed + +- Use FFI function calls for reference counting on all abi3 versions. [#4324](https://github.com/PyO3/pyo3/pull/4324) +- `#[pymodule(...)]` now directly accepts all relevant `#[pyo3(...)]` options. [#4330](https://github.com/PyO3/pyo3/pull/4330) + +### Fixed + +- Fix compile failure in declarative `#[pymodule]` under presence of `#![no_implicit_prelude]`. [#4328](https://github.com/PyO3/pyo3/pull/4328) +- Fix compile failure due to c-string literals on Rust < 1.79. [#4353](https://github.com/PyO3/pyo3/pull/4353) + + ## [0.22.1] - 2024-07-06 ### Added diff --git a/Cargo.toml b/Cargo.toml index 617400c9637..c7446c7da5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3" -version = "0.22.1" +version = "0.22.2" 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.22.1" } +pyo3-ffi = { path = "pyo3-ffi", version = "=0.22.2" } # support crates for macros feature -pyo3-macros = { path = "pyo3-macros", version = "=0.22.1", optional = true } +pyo3-macros = { path = "pyo3-macros", version = "=0.22.2", optional = true } indoc = { version = "2.0.1", optional = true } unindent = { version = "0.2.1", optional = true } @@ -63,7 +63,7 @@ rayon = "1.6.1" futures = "0.3.28" [build-dependencies] -pyo3-build-config = { path = "pyo3-build-config", version = "=0.22.1", features = ["resolve-config"] } +pyo3-build-config = { path = "pyo3-build-config", version = "=0.22.2", features = ["resolve-config"] } [features] default = ["macros"] diff --git a/README.md b/README.md index fd4acdd4154..2a6348437a2 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ name = "string_sum" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.22.1", features = ["extension-module"] } +pyo3 = { version = "0.22.2", features = ["extension-module"] } ``` **`src/lib.rs`** @@ -137,7 +137,7 @@ Start a new project with `cargo new` and add `pyo3` to the `Cargo.toml` like th ```toml [dependencies.pyo3] -version = "0.22.1" +version = "0.22.2" features = ["auto-initialize"] ``` diff --git a/examples/decorator/.template/pre-script.rhai b/examples/decorator/.template/pre-script.rhai index f21daafeb2a..a9f0eb4a289 100644 --- a/examples/decorator/.template/pre-script.rhai +++ b/examples/decorator/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.22.1"); +variable::set("PYO3_VERSION", "0.22.2"); 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 f21daafeb2a..a9f0eb4a289 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.22.1"); +variable::set("PYO3_VERSION", "0.22.2"); 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 086868dfc42..bbc96358a23 100644 --- a/examples/plugin/.template/pre-script.rhai +++ b/examples/plugin/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.22.1"); +variable::set("PYO3_VERSION", "0.22.2"); 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 0679e89ab3f..d28d9d09987 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.22.1"); +variable::set("PYO3_VERSION", "0.22.2"); 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 f21daafeb2a..a9f0eb4a289 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.22.1"); +variable::set("PYO3_VERSION", "0.22.2"); file::rename(".template/Cargo.toml", "Cargo.toml"); file::rename(".template/pyproject.toml", "pyproject.toml"); file::delete(".template"); diff --git a/newsfragments/4324.changed.md b/newsfragments/4324.changed.md deleted file mode 100644 index 2818159dda3..00000000000 --- a/newsfragments/4324.changed.md +++ /dev/null @@ -1 +0,0 @@ -Use FFI function calls for reference counting on all abi3 versions. diff --git a/newsfragments/4327.packaging.md b/newsfragments/4327.packaging.md deleted file mode 100644 index c98d06f7cba..00000000000 --- a/newsfragments/4327.packaging.md +++ /dev/null @@ -1,3 +0,0 @@ -This PR lets PyO3 checks `Py_GIL_DISABLED` build flag and prevents `pyo3-ffi` crate building against GIL-less Python, -unless -explicitly opt using the `UNSAFE_PYO3_BUILD_FREE_THREADED` environment flag. \ No newline at end of file diff --git a/newsfragments/4330.changed.md b/newsfragments/4330.changed.md deleted file mode 100644 index d465ec99cec..00000000000 --- a/newsfragments/4330.changed.md +++ /dev/null @@ -1 +0,0 @@ -`#[pymodule(...)]` now directly accepts all relevant `#[pyo3(...)]` options. diff --git a/newsfragments/4346.changed.md b/newsfragments/4346.changed.md deleted file mode 100644 index 1ac7952eae7..00000000000 --- a/newsfragments/4346.changed.md +++ /dev/null @@ -1 +0,0 @@ -chore: update `ruff` configuration to resolve deprecation warning diff --git a/newsfragments/4353.fixed.md b/newsfragments/4353.fixed.md deleted file mode 100644 index 73783479085..00000000000 --- a/newsfragments/4353.fixed.md +++ /dev/null @@ -1 +0,0 @@ -fixed compile error due to c-string literals on Rust < 1.79 \ No newline at end of file diff --git a/pyo3-build-config/Cargo.toml b/pyo3-build-config/Cargo.toml index d8c84685c7c..e7b180facff 100644 --- a/pyo3-build-config/Cargo.toml +++ b/pyo3-build-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-build-config" -version = "0.22.1" +version = "0.22.2" 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 85de25c80f0..ee7f6765cf6 100644 --- a/pyo3-ffi/Cargo.toml +++ b/pyo3-ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-ffi" -version = "0.22.1" +version = "0.22.2" description = "Python-API bindings for the PyO3 ecosystem" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -38,7 +38,7 @@ abi3-py312 = ["abi3", "pyo3-build-config/abi3-py312"] generate-import-lib = ["pyo3-build-config/python3-dll-a"] [build-dependencies] -pyo3-build-config = { path = "../pyo3-build-config", version = "=0.22.1", features = ["resolve-config"] } +pyo3-build-config = { path = "../pyo3-build-config", version = "=0.22.2", features = ["resolve-config"] } [lints] workspace = true diff --git a/pyo3-macros-backend/Cargo.toml b/pyo3-macros-backend/Cargo.toml index 280e12e37a6..09a662becd2 100644 --- a/pyo3-macros-backend/Cargo.toml +++ b/pyo3-macros-backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-macros-backend" -version = "0.22.1" +version = "0.22.2" description = "Code generation for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -16,7 +16,7 @@ edition = "2021" [dependencies] heck = "0.5" proc-macro2 = { version = "1.0.60", default-features = false } -pyo3-build-config = { path = "../pyo3-build-config", version = "=0.22.1", features = ["resolve-config"] } +pyo3-build-config = { path = "../pyo3-build-config", version = "=0.22.2", features = ["resolve-config"] } quote = { version = "1", default-features = false } [dependencies.syn] @@ -25,7 +25,7 @@ default-features = false features = ["derive", "parsing", "printing", "clone-impls", "full", "extra-traits"] [build-dependencies] -pyo3-build-config = { path = "../pyo3-build-config", version = "=0.22.1" } +pyo3-build-config = { path = "../pyo3-build-config", version = "=0.22.2" } [lints] workspace = true diff --git a/pyo3-macros/Cargo.toml b/pyo3-macros/Cargo.toml index 23da8ccd697..98003c67272 100644 --- a/pyo3-macros/Cargo.toml +++ b/pyo3-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-macros" -version = "0.22.1" +version = "0.22.2" description = "Proc macros for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -22,7 +22,7 @@ gil-refs = ["pyo3-macros-backend/gil-refs"] 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.22.1" } +pyo3-macros-backend = { path = "../pyo3-macros-backend", version = "=0.22.2" } [lints] workspace = true diff --git a/pyproject.toml b/pyproject.toml index 164296ce234..c5c4c9261e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ [tool.towncrier] filename = "CHANGELOG.md" -version = "0.22.1" +version = "0.22.2" start_string = "\n" template = ".towncrier.template.md" title_format = "## [{version}] - {project_date}"