From 284c42d840e3d09765c2acab9f529fc294374d9e Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Sun, 30 Jul 2023 17:54:44 +0100 Subject: [PATCH] release: 0.19.2 --- CHANGELOG.md | 33 ++++++++++++++++++- Cargo.toml | 8 ++--- README.md | 4 +-- examples/Cargo.toml | 2 +- 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/3269.fixed.md | 1 - newsfragments/3295.added.md | 1 - newsfragments/3297.added.md | 1 - newsfragments/3297.fixed.md | 1 - newsfragments/3300.fixed.md | 1 - newsfragments/3304.added.md | 1 - newsfragments/3306.changed.md | 1 - newsfragments/3313.fixed.md | 1 - newsfragments/3326.fixed.md | 1 - newsfragments/3328.fixed.md | 1 - newsfragments/3334.added.md | 1 - newsfragments/3335.changed.md | 1 - newsfragments/3335.fixed.md | 1 - newsfragments/3339.added.md | 1 - newsfragments/3342.changed.md | 1 - newsfragments/3345.changed.md | 1 - newsfragments/3346.added.md | 1 - newsfragments/3353.added.md | 1 - pyo3-build-config/Cargo.toml | 2 +- pyo3-ffi/Cargo.toml | 4 +-- pyo3-macros-backend/Cargo.toml | 2 +- pyo3-macros/Cargo.toml | 4 +-- pyproject.toml | 2 +- 32 files changed, 51 insertions(+), 38 deletions(-) delete mode 100644 newsfragments/3269.fixed.md delete mode 100644 newsfragments/3295.added.md delete mode 100644 newsfragments/3297.added.md delete mode 100644 newsfragments/3297.fixed.md delete mode 100644 newsfragments/3300.fixed.md delete mode 100644 newsfragments/3304.added.md delete mode 100644 newsfragments/3306.changed.md delete mode 100644 newsfragments/3313.fixed.md delete mode 100644 newsfragments/3326.fixed.md delete mode 100644 newsfragments/3328.fixed.md delete mode 100644 newsfragments/3334.added.md delete mode 100644 newsfragments/3335.changed.md delete mode 100644 newsfragments/3335.fixed.md delete mode 100644 newsfragments/3339.added.md delete mode 100644 newsfragments/3342.changed.md delete mode 100644 newsfragments/3345.changed.md delete mode 100644 newsfragments/3346.added.md delete mode 100644 newsfragments/3353.added.md diff --git a/CHANGELOG.md b/CHANGELOG.md index fe87c5c3..31a9e023 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,36 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h +## [0.19.2] - 2023-08-01 + +### Added + +- Add FFI definitions `PyState_AddModule`, `PyState_RemoveModule` and `PyState_FindModule` for PyPy 3.9 and up. [#3295](https://github.com/PyO3/pyo3/pull/3295) +- Add FFI definitions `_PyObject_CallFunction_SizeT` and `_PyObject_CallMethod_SizeT`. [#3297](https://github.com/PyO3/pyo3/pull/3297) +- Add a "performance" section to the guide collecting performance-related tricks and problems. [#3304](https://github.com/PyO3/pyo3/pull/3304) +- Add `PyErr::Display` for all Python versions, and FFI symbol `PyErr_DisplayException` for Python 3.12. [#3334](https://github.com/PyO3/pyo3/pull/3334) +- Add FFI definition `PyType_GetDict()` for Python 3.12. [#3339](https://github.com/PyO3/pyo3/pull/3339) +- Add `PyAny::downcast_exact`. [#3346](https://github.com/PyO3/pyo3/pull/3346) +- Add `PySlice::full()` to construct a full slice (`::`). [#3353](https://github.com/PyO3/pyo3/pull/3353) + +### Changed + +- Update `PyErr` for 3.12 betas to avoid deprecated ffi methods. [#3306](https://github.com/PyO3/pyo3/pull/3306) +- Update FFI definitions of `object.h` for Python 3.12.0b4. [#3335](https://github.com/PyO3/pyo3/pull/3335) +- Update `pyo3::ffi` struct definitions to be compatible with 3.12.0b4. [#3342](https://github.com/PyO3/pyo3/pull/3342) +- Optimize conversion of `float` to `f64` (and `PyFloat::value`) on non-abi3 builds. [#3345](https://github.com/PyO3/pyo3/pull/3345) + +### Fixed + +- Fix timezone conversion bug for FixedOffset datetimes that were being incorrectly converted to and from UTC. [#3269](https://github.com/PyO3/pyo3/pull/3269) +- Fix `SystemError` raised in `PyUnicodeDecodeError_Create` on PyPy 3.10. [#3297](https://github.com/PyO3/pyo3/pull/3297) +- Correct FFI definition `Py_EnterRecursiveCall` to return `c_int` (was incorrectly returning `()`). [#3300](https://github.com/PyO3/pyo3/pull/3300) +- Fix case where `PyErr::matches` and `PyErr::is_instance` returned results inconsistent with `PyErr::get_type`. [#3313](https://github.com/PyO3/pyo3/pull/3313) +- Fix loss of panic message in `PanicException` when unwinding after the exception was "normalized". [#3326](https://github.com/PyO3/pyo3/pull/3326) +- Fix `PyErr::from_value` and `PyErr::into_value` losing traceback on conversion. [#3328](https://github.com/PyO3/pyo3/pull/3328) +- Fix reference counting of immortal objects on Python 3.12.0b4. [#3335](https://github.com/PyO3/pyo3/pull/3335) + + ## [0.19.1] - 2023-07-03 ### Packaging @@ -1503,7 +1533,8 @@ Yanked - Initial release -[Unreleased]: https://github.com/pyo3/pyo3/compare/v0.19.1...HEAD +[Unreleased]: https://github.com/pyo3/pyo3/compare/v0.19.2...HEAD +[0.19.2]: https://github.com/pyo3/pyo3/compare/v0.19.1...v0.19.2 [0.19.1]: https://github.com/pyo3/pyo3/compare/v0.19.0...v0.19.1 [0.19.0]: https://github.com/pyo3/pyo3/compare/v0.18.3...v0.19.0 [0.18.3]: https://github.com/pyo3/pyo3/compare/v0.18.2...v0.18.3 diff --git a/Cargo.toml b/Cargo.toml index 6c0865d7..e457e9f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3" -version = "0.19.1" +version = "0.19.2" description = "Bindings to Python interpreter" authors = ["PyO3 Project and Contributors "] readme = "README.md" @@ -21,10 +21,10 @@ parking_lot = ">= 0.11, < 0.13" memoffset = "0.9" # ffi bindings to the python interpreter, split into a separate crate so they can be used independently -pyo3-ffi = { path = "pyo3-ffi", version = "=0.19.1" } +pyo3-ffi = { path = "pyo3-ffi", version = "=0.19.2" } # support crates for macros feature -pyo3-macros = { path = "pyo3-macros", version = "=0.19.1", optional = true } +pyo3-macros = { path = "pyo3-macros", version = "=0.19.2", optional = true } indoc = { version = "2.0.1", optional = true } unindent = { version = "0.2.1", optional = true } @@ -56,7 +56,7 @@ rust_decimal = { version = "1.8.0", features = ["std"] } widestring = "0.5.1" [build-dependencies] -pyo3-build-config = { path = "pyo3-build-config", version = "0.19.1", features = ["resolve-config"] } +pyo3-build-config = { path = "pyo3-build-config", version = "0.19.2", features = ["resolve-config"] } [features] default = ["macros"] diff --git a/README.md b/README.md index a634ea8c..804fd410 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ name = "string_sum" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.19.1", features = ["extension-module"] } +pyo3 = { version = "0.19.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.19.1" +version = "0.19.2" features = ["auto-initialize"] ``` diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 5956c2f2..d5072a30 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -5,7 +5,7 @@ publish = false edition = "2021" [dev-dependencies] -pyo3 = { version = "0.19.1", path = "..", features = ["auto-initialize", "extension-module"] } +pyo3 = { version = "0.19.2", path = "..", features = ["auto-initialize", "extension-module"] } [[example]] name = "decorator" diff --git a/examples/decorator/.template/pre-script.rhai b/examples/decorator/.template/pre-script.rhai index 088ea73b..d3341677 100644 --- a/examples/decorator/.template/pre-script.rhai +++ b/examples/decorator/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.19.1"); +variable::set("PYO3_VERSION", "0.19.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 088ea73b..d3341677 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.19.1"); +variable::set("PYO3_VERSION", "0.19.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 158e1522..6ab231df 100644 --- a/examples/plugin/.template/pre-script.rhai +++ b/examples/plugin/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.19.1"); +variable::set("PYO3_VERSION", "0.19.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 19ea7cc8..b06e0f27 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.19.1"); +variable::set("PYO3_VERSION", "0.19.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 a4bfa7ce..1349490d 100644 --- a/examples/word-count/.template/pre-script.rhai +++ b/examples/word-count/.template/pre-script.rhai @@ -1,3 +1,3 @@ -variable::set("PYO3_VERSION", "0.19.1"); +variable::set("PYO3_VERSION", "0.19.2"); file::rename(".template/Cargo.toml", "Cargo.toml"); file::delete(".template"); diff --git a/newsfragments/3269.fixed.md b/newsfragments/3269.fixed.md deleted file mode 100644 index 0f1e1af7..00000000 --- a/newsfragments/3269.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix timezone conversion bug for FixedOffset datetimes that were being incorrectly converted to and from UTC. diff --git a/newsfragments/3295.added.md b/newsfragments/3295.added.md deleted file mode 100644 index 82987455..00000000 --- a/newsfragments/3295.added.md +++ /dev/null @@ -1 +0,0 @@ -Add FFI definitions `PyState_AddModule`, `PyState_RemoveModule` and `PyState_FindModule` for PyPy 3.9 and up. diff --git a/newsfragments/3297.added.md b/newsfragments/3297.added.md deleted file mode 100644 index 65d54832..00000000 --- a/newsfragments/3297.added.md +++ /dev/null @@ -1 +0,0 @@ -Add FFI definitions `_PyObject_CallFunction_SizeT` and `_PyObject_CallMethod_SizeT`. diff --git a/newsfragments/3297.fixed.md b/newsfragments/3297.fixed.md deleted file mode 100644 index 65e211b4..00000000 --- a/newsfragments/3297.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix `SystemError` raised in `PyUnicodeDecodeError_Create` on PyPy 3.10. diff --git a/newsfragments/3300.fixed.md b/newsfragments/3300.fixed.md deleted file mode 100644 index e7c09ff5..00000000 --- a/newsfragments/3300.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Correct FFI definition `Py_EnterRecursiveCall` to return `c_int` (was incorrectly returning `()`). diff --git a/newsfragments/3304.added.md b/newsfragments/3304.added.md deleted file mode 100644 index f3b62eba..00000000 --- a/newsfragments/3304.added.md +++ /dev/null @@ -1 +0,0 @@ -Added a "performance" section to the guide collecting performance-related tricks and problems. diff --git a/newsfragments/3306.changed.md b/newsfragments/3306.changed.md deleted file mode 100644 index a2bbc985..00000000 --- a/newsfragments/3306.changed.md +++ /dev/null @@ -1 +0,0 @@ -Update `PyErr` for 3.12 betas to avoid deprecated ffi methods. diff --git a/newsfragments/3313.fixed.md b/newsfragments/3313.fixed.md deleted file mode 100644 index e5fc5c0e..00000000 --- a/newsfragments/3313.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix case where `PyErr::matches` and `PyErr::is_instance` returned results inconsistent with `PyErr::get_type`. diff --git a/newsfragments/3326.fixed.md b/newsfragments/3326.fixed.md deleted file mode 100644 index 8353c598..00000000 --- a/newsfragments/3326.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix loss of panic message in `PanicException` when unwinding after the exception was "normalized". diff --git a/newsfragments/3328.fixed.md b/newsfragments/3328.fixed.md deleted file mode 100644 index 7db0293b..00000000 --- a/newsfragments/3328.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fixed `PyErr.from_value()` and `PyErr.into_value()` to both maintain original traceback instead of losing it on conversion. \ No newline at end of file diff --git a/newsfragments/3334.added.md b/newsfragments/3334.added.md deleted file mode 100644 index fd3824ad..00000000 --- a/newsfragments/3334.added.md +++ /dev/null @@ -1 +0,0 @@ -Add `PyErr::Display` for all Python versions, and FFI symbol `PyErr_DisplayException` for Python 3.12. diff --git a/newsfragments/3335.changed.md b/newsfragments/3335.changed.md deleted file mode 100644 index c35f1ddb..00000000 --- a/newsfragments/3335.changed.md +++ /dev/null @@ -1 +0,0 @@ -Update FFI definitions of `object.h` for Python 3.12 and up. diff --git a/newsfragments/3335.fixed.md b/newsfragments/3335.fixed.md deleted file mode 100644 index bc7bb8b6..00000000 --- a/newsfragments/3335.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix reference counting of immortal objects on Python 3.12 betas. diff --git a/newsfragments/3339.added.md b/newsfragments/3339.added.md deleted file mode 100644 index 88884bfd..00000000 --- a/newsfragments/3339.added.md +++ /dev/null @@ -1 +0,0 @@ -Define `PyType_GetDict()` FFI for CPython 3.12 or later. diff --git a/newsfragments/3342.changed.md b/newsfragments/3342.changed.md deleted file mode 100644 index 71435df0..00000000 --- a/newsfragments/3342.changed.md +++ /dev/null @@ -1 +0,0 @@ -Update `pyo3::ffi` struct definitions to be compatible with 3.12.0b4. diff --git a/newsfragments/3345.changed.md b/newsfragments/3345.changed.md deleted file mode 100644 index 35143e6a..00000000 --- a/newsfragments/3345.changed.md +++ /dev/null @@ -1 +0,0 @@ -Optimize conversion of `float` to `f64` (and `PyFloat::value`) on non-abi3 builds. diff --git a/newsfragments/3346.added.md b/newsfragments/3346.added.md deleted file mode 100644 index 7e7085cb..00000000 --- a/newsfragments/3346.added.md +++ /dev/null @@ -1 +0,0 @@ -Add `PyAny::downcast_exact`. diff --git a/newsfragments/3353.added.md b/newsfragments/3353.added.md deleted file mode 100644 index 2db4834e..00000000 --- a/newsfragments/3353.added.md +++ /dev/null @@ -1 +0,0 @@ -Add `PySlice::full()` to construct a full slice (`::`). diff --git a/pyo3-build-config/Cargo.toml b/pyo3-build-config/Cargo.toml index f738db38..79278cab 100644 --- a/pyo3-build-config/Cargo.toml +++ b/pyo3-build-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-build-config" -version = "0.19.1" +version = "0.19.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 0af072b9..8c218014 100644 --- a/pyo3-ffi/Cargo.toml +++ b/pyo3-ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-ffi" -version = "0.19.1" +version = "0.19.2" description = "Python-API bindings for the PyO3 ecosystem" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -38,4 +38,4 @@ generate-import-lib = ["pyo3-build-config/python3-dll-a"] [build-dependencies] -pyo3-build-config = { path = "../pyo3-build-config", version = "0.19.1", features = ["resolve-config"] } +pyo3-build-config = { path = "../pyo3-build-config", version = "0.19.2", features = ["resolve-config"] } diff --git a/pyo3-macros-backend/Cargo.toml b/pyo3-macros-backend/Cargo.toml index d04c836c..8cd1116f 100644 --- a/pyo3-macros-backend/Cargo.toml +++ b/pyo3-macros-backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-macros-backend" -version = "0.19.1" +version = "0.19.2" description = "Code generation for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] diff --git a/pyo3-macros/Cargo.toml b/pyo3-macros/Cargo.toml index 69bf21ca..f8304926 100644 --- a/pyo3-macros/Cargo.toml +++ b/pyo3-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-macros" -version = "0.19.1" +version = "0.19.2" description = "Proc macros for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -22,4 +22,4 @@ abi3 = ["pyo3-macros-backend/abi3"] proc-macro2 = { version = "1", default-features = false } quote = "1" syn = { version = "2", features = ["full", "extra-traits"] } -pyo3-macros-backend = { path = "../pyo3-macros-backend", version = "=0.19.1" } +pyo3-macros-backend = { path = "../pyo3-macros-backend", version = "=0.19.2" } diff --git a/pyproject.toml b/pyproject.toml index ae99ebf7..1892c2ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ exclude = ''' [tool.towncrier] filename = "CHANGELOG.md" -version = "0.19.1" +version = "0.19.2" start_string = "\n" template = ".towncrier.template.md" title_format = "## [{version}] - {project_date}"