From af54be4c03c158233b82378faa1c5125d63d36cb Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Mon, 16 Feb 2026 21:24:23 -0700 Subject: [PATCH 1/4] Fix typo in PyType_GetTypeDataSize bindings (#5819) --- pyo3-ffi/src/object.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyo3-ffi/src/object.rs b/pyo3-ffi/src/object.rs index 7e4a8a4227e..ddeabb9be3f 100644 --- a/pyo3-ffi/src/object.rs +++ b/pyo3-ffi/src/object.rs @@ -381,8 +381,8 @@ extern "C" { pub fn PyObject_GetTypeData(obj: *mut PyObject, cls: *mut PyTypeObject) -> *mut c_void; #[cfg(Py_3_12)] - #[cfg_attr(PyPy, link_name = "PyPyObject_GetTypeDataSize")] - pub fn PyObject_GetTypeDataSize(cls: *mut PyTypeObject) -> Py_ssize_t; + #[cfg_attr(PyPy, link_name = "PyPyType_GetTypeDataSize")] + pub fn PyType_GetTypeDataSize(cls: *mut PyTypeObject) -> Py_ssize_t; #[cfg_attr(PyPy, link_name = "PyPyType_IsSubtype")] pub fn PyType_IsSubtype(a: *mut PyTypeObject, b: *mut PyTypeObject) -> c_int; From 88b5daeaaa08815bf1867f0db530a667d3d47f87 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Tue, 17 Feb 2026 17:44:38 +0000 Subject: [PATCH 2/4] fix memory corruption when subclassing variable-size types (e.g. `abi3` + 3.12 subclassing of native types) (#5823) * add test for subclassing variable-sized type * fix type confusion inside `get_contents_of_obj` * newsfragment --- newsfragments/5823.fixed.md | 1 + src/pycell/impl_.rs | 30 ++++++++++++++++++++---------- tests/test_inheritance.rs | 34 ++++++++++++++++++++++++++++++---- 3 files changed, 51 insertions(+), 14 deletions(-) create mode 100644 newsfragments/5823.fixed.md diff --git a/newsfragments/5823.fixed.md b/newsfragments/5823.fixed.md new file mode 100644 index 00000000000..d0671a2ea96 --- /dev/null +++ b/newsfragments/5823.fixed.md @@ -0,0 +1 @@ +Fix memory corruption when subclassing native types with `abi3` feature on Python 3.12+ (newly enabled in PyO3 0.28.0). diff --git a/src/pycell/impl_.rs b/src/pycell/impl_.rs index f397adeb5be..276eaafc600 100644 --- a/src/pycell/impl_.rs +++ b/src/pycell/impl_.rs @@ -11,9 +11,9 @@ use crate::impl_::pyclass::{ PyClassBaseType, PyClassDict, PyClassImpl, PyClassThreadChecker, PyClassWeakRef, PyObjectOffset, }; use crate::internal::get_slot::{TP_DEALLOC, TP_FREE}; -use crate::type_object::{PyLayout, PySizedLayout}; +use crate::type_object::{PyLayout, PySizedLayout, PyTypeInfo}; use crate::types::PyType; -use crate::{ffi, PyClass, PyTypeInfo, Python}; +use crate::{ffi, PyClass, Python}; use crate::types::PyTypeMethods; @@ -477,21 +477,31 @@ pub struct PyVariableClassObject { } #[cfg(Py_3_12)] -impl> PyVariableClassObject { - fn get_contents_of_obj(obj: *mut ffi::PyObject) -> *mut PyClassObjectContents { - // https://peps.python.org/pep-0697/ - let type_obj = unsafe { ffi::Py_TYPE(obj) }; +impl> PyVariableClassObject { + /// # Safety + /// - `obj` must have the layout that the implementation is expecting + /// - thread must be attached to the interpreter + unsafe fn get_contents_of_obj( + obj: *mut ffi::PyObject, + ) -> *mut MaybeUninit> { + // TODO: it would be nice to eventually avoid coupling to the PyO3 statics here, maybe using + // 3.14's PyType_GetBaseByToken, to support PEP 587 / multiple interpreters better + // SAFETY: caller guarantees attached to the interpreter + let type_obj = T::type_object_raw(unsafe { Python::assume_attached() }); let pointer = unsafe { ffi::PyObject_GetTypeData(obj, type_obj) }; pointer.cast() } fn get_contents_ptr(&self) -> *mut PyClassObjectContents { - Self::get_contents_of_obj(self as *const PyVariableClassObject as *mut ffi::PyObject) + unsafe { + Self::get_contents_of_obj(self as *const PyVariableClassObject as *mut ffi::PyObject) + } + .cast() } } #[cfg(Py_3_12)] -impl> PyClassObjectLayout for PyVariableClassObject { +impl> PyClassObjectLayout for PyVariableClassObject { /// Gets the offset of the contents from the start of the struct in bytes. const CONTENTS_OFFSET: PyObjectOffset = PyObjectOffset::Relative(0); const BASIC_SIZE: ffi::Py_ssize_t = { @@ -514,7 +524,7 @@ impl> PyClassObjectLayout for PyVariableClassOb unsafe fn contents_uninit( obj: *mut ffi::PyObject, ) -> *mut MaybeUninit> { - Self::get_contents_of_obj(obj).cast() + unsafe { Self::get_contents_of_obj(obj) } } fn get_ptr(&self) -> *mut T { @@ -543,7 +553,7 @@ impl> PyClassObjectLayout for PyVariableClassOb unsafe impl PyLayout for PyVariableClassObject {} #[cfg(Py_3_12)] -impl> PyClassObjectBaseLayout for PyVariableClassObject +impl> PyClassObjectBaseLayout for PyVariableClassObject where ::LayoutAsBase: PyClassObjectBaseLayout, { diff --git a/tests/test_inheritance.rs b/tests/test_inheritance.rs index a7b07346024..4843c67fd9c 100644 --- a/tests/test_inheritance.rs +++ b/tests/test_inheritance.rs @@ -304,7 +304,7 @@ mod inheriting_native_type { #[test] #[cfg(Py_3_12)] fn inherit_list() { - #[pyclass(extends=pyo3::types::PyList)] + #[pyclass(extends=pyo3::types::PyList, subclass)] struct ListWithName { #[pyo3(get)] name: &'static str, @@ -318,12 +318,38 @@ mod inheriting_native_type { } } + #[pyclass(extends=ListWithName)] + struct SubListWithName { + #[pyo3(get)] + sub_name: &'static str, + } + + #[pymethods] + impl SubListWithName { + #[new] + fn new() -> PyClassInitializer { + PyClassInitializer::from(ListWithName::new()).add_subclass(Self { + sub_name: "Sublist", + }) + } + } + Python::attach(|py| { - let list_sub = pyo3::Bound::new(py, ListWithName::new()).unwrap(); + let list_with_name = pyo3::Bound::new(py, ListWithName::new()).unwrap(); + let sub_list_with_name = pyo3::Bound::new(py, SubListWithName::new()).unwrap(); py_run!( py, - list_sub, - r#"list_sub.append(1); assert list_sub[0] == 1; assert list_sub.name == "Hello :)""# + list_with_name sub_list_with_name, + r#" + list_with_name.append(1) + assert list_with_name[0] == 1 + assert list_with_name.name == "Hello :)", list_with_name.name + + sub_list_with_name.append(1) + assert sub_list_with_name[0] == 1 + assert sub_list_with_name.name == "Hello :)", sub_list_with_name.name + assert sub_list_with_name.sub_name == "Sublist", sub_list_with_name.sub_name + "# ); }); } From 988bc88f105ef07da539622c733ee098ec09a44b Mon Sep 17 00:00:00 2001 From: Icxolu <10486322+Icxolu@users.noreply.github.com> Date: Tue, 17 Feb 2026 21:43:09 +0100 Subject: [PATCH 3/4] fix complex enum `__qualname__` not using python name (#5815) --- newsfragments/5815.fixed.md | 1 + pyo3-macros-backend/src/pyclass.rs | 45 +++++++++++++++++++++++++----- tests/test_enum.rs | 18 ++++++++++++ 3 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 newsfragments/5815.fixed.md diff --git a/newsfragments/5815.fixed.md b/newsfragments/5815.fixed.md new file mode 100644 index 00000000000..fbbec83129e --- /dev/null +++ b/newsfragments/5815.fixed.md @@ -0,0 +1 @@ +fix complex enum `__qualname__` not using python name \ No newline at end of file diff --git a/pyo3-macros-backend/src/pyclass.rs b/pyo3-macros-backend/src/pyclass.rs index 0e596a136b8..3ebe10c7780 100644 --- a/pyo3-macros-backend/src/pyclass.rs +++ b/pyo3-macros-backend/src/pyclass.rs @@ -823,12 +823,32 @@ struct PyClassEnumStructVariant<'a> { options: EnumVariantPyO3Options, } +impl PyClassEnumStructVariant<'_> { + fn python_name(&self) -> Cow<'_, syn::Ident> { + self.options + .name + .as_ref() + .map(|name_attr| Cow::Borrowed(&name_attr.value.0)) + .unwrap_or_else(|| Cow::Owned(self.ident.unraw())) + } +} + struct PyClassEnumTupleVariant<'a> { ident: &'a syn::Ident, fields: Vec>, options: EnumVariantPyO3Options, } +impl PyClassEnumTupleVariant<'_> { + fn python_name(&self) -> Cow<'_, syn::Ident> { + self.options + .name + .as_ref() + .map(|name_attr| Cow::Borrowed(&name_attr.value.0)) + .unwrap_or_else(|| Cow::Owned(self.ident.unraw())) + } +} + struct PyClassEnumVariantNamedField<'a> { ident: &'a syn::Ident, ty: &'a syn::Type, @@ -1288,7 +1308,7 @@ fn impl_complex_enum( variant_cls_pytypeinfos.push(variant_cls_pytypeinfo); let (variant_cls_impl, field_getters, mut slots) = - impl_complex_enum_variant_cls(cls, &variant, ctx)?; + impl_complex_enum_variant_cls(cls, &args, &variant, ctx)?; variant_cls_impls.push(variant_cls_impl); let variant_new = complex_enum_variant_new(cls, variant, ctx)?; @@ -1341,15 +1361,16 @@ fn impl_complex_enum( fn impl_complex_enum_variant_cls( enum_name: &syn::Ident, + args: &PyClassArgs, variant: &PyClassEnumVariant<'_>, ctx: &Ctx, ) -> Result<(TokenStream, Vec, Vec)> { match variant { PyClassEnumVariant::Struct(struct_variant) => { - impl_complex_enum_struct_variant_cls(enum_name, struct_variant, ctx) + impl_complex_enum_struct_variant_cls(enum_name, args, struct_variant, ctx) } PyClassEnumVariant::Tuple(tuple_variant) => { - impl_complex_enum_tuple_variant_cls(enum_name, tuple_variant, ctx) + impl_complex_enum_tuple_variant_cls(enum_name, args, tuple_variant, ctx) } } } @@ -1406,6 +1427,7 @@ fn impl_complex_enum_variant_match_args( fn impl_complex_enum_struct_variant_cls( enum_name: &syn::Ident, + args: &PyClassArgs, variant: &PyClassEnumStructVariant<'_>, ctx: &Ctx, ) -> Result<(TokenStream, Vec, Vec)> { @@ -1452,8 +1474,12 @@ fn impl_complex_enum_struct_variant_cls( field_getter_impls.push(field_getter_impl); } - let (qualname, qualname_impl) = - impl_complex_enum_variant_qualname(enum_name, variant_ident, &variant_cls_type, ctx)?; + let (qualname, qualname_impl) = impl_complex_enum_variant_qualname( + &get_class_python_name(enum_name, args), + &variant.python_name(), + &variant_cls_type, + ctx, + )?; field_getters.push(qualname); @@ -1624,6 +1650,7 @@ fn impl_complex_enum_tuple_variant_getitem( fn impl_complex_enum_tuple_variant_cls( enum_name: &syn::Ident, + args: &PyClassArgs, variant: &PyClassEnumTupleVariant<'_>, ctx: &Ctx, ) -> Result<(TokenStream, Vec, Vec)> { @@ -1648,8 +1675,12 @@ fn impl_complex_enum_tuple_variant_cls( &mut field_types, )?; - let (qualname, qualname_impl) = - impl_complex_enum_variant_qualname(enum_name, variant_ident, &variant_cls_type, ctx)?; + let (qualname, qualname_impl) = impl_complex_enum_variant_qualname( + &get_class_python_name(enum_name, args), + &variant.python_name(), + &variant_cls_type, + ctx, + )?; field_getters.push(qualname); diff --git a/tests/test_enum.rs b/tests/test_enum.rs index 5b11a725e3f..d690dd94db3 100644 --- a/tests/test_enum.rs +++ b/tests/test_enum.rs @@ -419,3 +419,21 @@ fn complex_enum_variant_qualname() { py_assert!(py, cls, "cls.B.__qualname__ == 'ComplexEnum.B'"); }); } + +#[test] +fn complex_enum_renamed_variant_qualname() { + #[pyclass(name = "ComplexEnum", skip_from_py_object)] + pub enum PyComplexEnum { + #[pyo3(name = "A")] + PyA(i32), + B { + msg: String, + }, + } + + Python::attach(|py| { + let cls = py.get_type::(); + py_assert!(py, cls, "cls.A.__qualname__ == 'ComplexEnum.A'"); + py_assert!(py, cls, "cls.B.__qualname__ == 'ComplexEnum.B'"); + }); +} From 0cb9b7173e91e45b7f3f75d31c32b77adf33a132 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Tue, 17 Feb 2026 19:44:54 +0000 Subject: [PATCH 4/4] release: 0.28.2 --- CHANGELOG.md | 14 ++++++++++++-- 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/5518-packaging.md | 1 - newsfragments/5808.fixed.md | 1 - newsfragments/5815.fixed.md | 1 - newsfragments/5823.fixed.md | 1 - pyo3-build-config/Cargo.toml | 2 +- pyo3-ffi/Cargo.toml | 4 ++-- pyo3-ffi/README.md | 4 ++-- pyo3-introspection/Cargo.toml | 2 +- pyo3-macros-backend/Cargo.toml | 6 +++--- pyo3-macros/Cargo.toml | 4 ++-- pyproject.toml | 2 +- tests/ui/reject_generics.stderr | 4 ++-- 20 files changed, 37 insertions(+), 31 deletions(-) delete mode 100644 newsfragments/5518-packaging.md delete mode 100644 newsfragments/5808.fixed.md delete mode 100644 newsfragments/5815.fixed.md delete mode 100644 newsfragments/5823.fixed.md diff --git a/CHANGELOG.md b/CHANGELOG.md index ec57c7832d2..404310fcec7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,14 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h +## [0.28.2] - 2026-02-18 + +### Fixed + +- Fix complex enum `__qualname__` not using python name [#5815](https://github.com/PyO3/pyo3/pull/5815) +- Fix FFI definition `PyType_GetTypeDataSize` (was incorrectly named `PyObject_GetTypeDataSize`). [#5819](https://github.com/PyO3/pyo3/pull/5819) +- Fix memory corruption when subclassing native types with `abi3` feature on Python 3.12+ (newly enabled in PyO3 0.28.0). [#5823](https://github.com/PyO3/pyo3/pull/5823) + ## [0.28.1] - 2026-02-14 ### Fixed @@ -18,6 +26,7 @@ To see unreleased changes, please see the [CHANGELOG on the main branch guide](h - Fix `clippy::declare_interior_mutable_const` warning inside `#[pyclass]` generated code on enums. [#5772](https://github.com/PyO3/pyo3/pull/5772) - Fix `ambiguous_associated_items` compilation error when deriving `FromPyObject` or using `#[pyclass(from_py_object)]` macro on enums with `Error` variant. [#5784](https://github.com/PyO3/pyo3/pull/5784) - Fix `__qualname__` for complex `#[pyclass]` enum variants to include the enum name. [#5796](https://github.com/PyO3/pyo3/pull/5796) +- Fix missing `std::sync::atomic::Ordering` import for targets without atomic64. [#5808](https://github.com/PyO3/pyo3/pull/5808) ## [0.28.0] - 2026-02-01 @@ -2498,8 +2507,9 @@ Yanked - Initial release -[Unreleased]: https://github.com/pyo3/pyo3/compare/v0.28.1...HEAD -[0.28.0]: https://github.com/pyo3/pyo3/compare/v0.28.0...v0.28.1 +[Unreleased]: https://github.com/pyo3/pyo3/compare/v0.28.2...HEAD +[0.28.2]: https://github.com/pyo3/pyo3/compare/v0.28.1...v0.28.2 +[0.28.1]: https://github.com/pyo3/pyo3/compare/v0.28.0...v0.28.1 [0.28.0]: https://github.com/pyo3/pyo3/compare/v0.27.2...v0.28.0 [0.27.2]: https://github.com/pyo3/pyo3/compare/v0.27.1...v0.27.2 [0.27.1]: https://github.com/pyo3/pyo3/compare/v0.27.0...v0.27.1 diff --git a/Cargo.toml b/Cargo.toml index 7cffab03b9b..f67a157f32c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3" -version = "0.28.1" +version = "0.28.2" description = "Bindings to Python interpreter" authors = ["PyO3 Project and Contributors "] readme = "README.md" @@ -29,10 +29,10 @@ libc = "0.2.62" once_cell = "1.21" # ffi bindings to the python interpreter, split into a separate crate so they can be used independently -pyo3-ffi = { path = "pyo3-ffi", version = "=0.28.1" } +pyo3-ffi = { path = "pyo3-ffi", version = "=0.28.2" } # support crate for macros feature -pyo3-macros = { path = "pyo3-macros", version = "=0.28.1", optional = true } +pyo3-macros = { path = "pyo3-macros", version = "=0.28.2", optional = true } # support crate for multiple-pymethods feature inventory = { version = "0.3.5", optional = true } @@ -82,7 +82,7 @@ uuid = { version = "1.10.0", features = ["v4"] } parking_lot = { version = "0.12.3", features = ["arc_lock"] } [build-dependencies] -pyo3-build-config = { path = "pyo3-build-config", version = "=0.28.1", features = ["resolve-config"] } +pyo3-build-config = { path = "pyo3-build-config", version = "=0.28.2", features = ["resolve-config"] } [features] default = ["macros"] diff --git a/README.md b/README.md index 7bb3ff77e82..8e945946b36 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ name = "string_sum" crate-type = ["cdylib"] [dependencies] -pyo3 = "0.28.1" +pyo3 = "0.28.2" ``` **`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.28.1" +version = "0.28.2" # Enabling this cargo feature will cause PyO3 to start a Python interpreter on first call to `Python::attach` features = ["auto-initialize"] ``` diff --git a/examples/decorator/.template/pre-script.rhai b/examples/decorator/.template/pre-script.rhai index 3dbfd46e57f..290e5103e11 100644 --- a/examples/decorator/.template/pre-script.rhai +++ b/examples/decorator/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.28.1"); +variable::set("PYO3_VERSION", "0.28.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 3dbfd46e57f..290e5103e11 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.28.1"); +variable::set("PYO3_VERSION", "0.28.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 24afdfa307b..8d97f0e0657 100644 --- a/examples/plugin/.template/pre-script.rhai +++ b/examples/plugin/.template/pre-script.rhai @@ -1,4 +1,4 @@ -variable::set("PYO3_VERSION", "0.28.1"); +variable::set("PYO3_VERSION", "0.28.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 101e2ce1e63..337ab8b6360 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.28.1"); +variable::set("PYO3_VERSION", "0.28.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 3dbfd46e57f..290e5103e11 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.28.1"); +variable::set("PYO3_VERSION", "0.28.2"); file::rename(".template/Cargo.toml", "Cargo.toml"); file::rename(".template/pyproject.toml", "pyproject.toml"); file::delete(".template"); diff --git a/newsfragments/5518-packaging.md b/newsfragments/5518-packaging.md deleted file mode 100644 index 0b6b0664792..00000000000 --- a/newsfragments/5518-packaging.md +++ /dev/null @@ -1 +0,0 @@ -Add 3.15 to CI for preliminary testing diff --git a/newsfragments/5808.fixed.md b/newsfragments/5808.fixed.md deleted file mode 100644 index a02aa44380d..00000000000 --- a/newsfragments/5808.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix missing `std::sync::atomic::Ordering` import for targets without atomic64. \ No newline at end of file diff --git a/newsfragments/5815.fixed.md b/newsfragments/5815.fixed.md deleted file mode 100644 index fbbec83129e..00000000000 --- a/newsfragments/5815.fixed.md +++ /dev/null @@ -1 +0,0 @@ -fix complex enum `__qualname__` not using python name \ No newline at end of file diff --git a/newsfragments/5823.fixed.md b/newsfragments/5823.fixed.md deleted file mode 100644 index d0671a2ea96..00000000000 --- a/newsfragments/5823.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix memory corruption when subclassing native types with `abi3` feature on Python 3.12+ (newly enabled in PyO3 0.28.0). diff --git a/pyo3-build-config/Cargo.toml b/pyo3-build-config/Cargo.toml index 82a70b008b9..83029d35dd8 100644 --- a/pyo3-build-config/Cargo.toml +++ b/pyo3-build-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-build-config" -version = "0.28.1" +version = "0.28.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 d64a7dadda0..e23893009a6 100644 --- a/pyo3-ffi/Cargo.toml +++ b/pyo3-ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-ffi" -version = "0.28.1" +version = "0.28.2" 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/generate-import-lib"] paste = "1" [build-dependencies] -pyo3-build-config = { path = "../pyo3-build-config", version = "=0.28.1", features = ["resolve-config"] } +pyo3-build-config = { path = "../pyo3-build-config", version = "=0.28.2", features = ["resolve-config"] } [lints] workspace = true diff --git a/pyo3-ffi/README.md b/pyo3-ffi/README.md index d34a2361bcc..ba42a0da2aa 100644 --- a/pyo3-ffi/README.md +++ b/pyo3-ffi/README.md @@ -41,12 +41,12 @@ name = "string_sum" crate-type = ["cdylib"] [dependencies] -pyo3-ffi = "0.28.1" +pyo3-ffi = "0.28.2" [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.28.1" +pyo3_build_config = "0.28.2" ``` If you need to use conditional compilation based on Python version or how diff --git a/pyo3-introspection/Cargo.toml b/pyo3-introspection/Cargo.toml index 0cd7ae225a4..1d06082d0b8 100644 --- a/pyo3-introspection/Cargo.toml +++ b/pyo3-introspection/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-introspection" -version = "0.28.1" +version = "0.28.2" description = "Introspect dynamic libraries built with PyO3 to get metadata about the exported Python types" authors = ["PyO3 Project and Contributors "] homepage = "https://github.com/pyo3/pyo3" diff --git a/pyo3-macros-backend/Cargo.toml b/pyo3-macros-backend/Cargo.toml index ef31a8be3b6..c34b01f96d6 100644 --- a/pyo3-macros-backend/Cargo.toml +++ b/pyo3-macros-backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-macros-backend" -version = "0.28.1" +version = "0.28.2" description = "Code generation for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -17,7 +17,7 @@ rust-version.workspace = true [dependencies] heck = "0.5" proc-macro2 = { version = "1.0.60", default-features = false } -pyo3-build-config = { path = "../pyo3-build-config", version = "=0.28.1", features = ["resolve-config"] } +pyo3-build-config = { path = "../pyo3-build-config", version = "=0.28.2", features = ["resolve-config"] } quote = { version = "1.0.37", default-features = false } [dependencies.syn] @@ -27,7 +27,7 @@ default-features = false features = ["derive", "parsing", "printing", "clone-impls", "full", "extra-traits", "visit-mut"] [build-dependencies] -pyo3-build-config = { path = "../pyo3-build-config", version = "=0.28.1" } +pyo3-build-config = { path = "../pyo3-build-config", version = "=0.28.2" } [lints] workspace = true diff --git a/pyo3-macros/Cargo.toml b/pyo3-macros/Cargo.toml index 42410d71db0..169f307b9bd 100644 --- a/pyo3-macros/Cargo.toml +++ b/pyo3-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyo3-macros" -version = "0.28.1" +version = "0.28.2" description = "Proc macros for PyO3 package" authors = ["PyO3 Project and Contributors "] keywords = ["pyo3", "python", "cpython", "ffi"] @@ -23,7 +23,7 @@ experimental-inspect = ["pyo3-macros-backend/experimental-inspect"] 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.28.1" } +pyo3-macros-backend = { path = "../pyo3-macros-backend", version = "=0.28.2" } [lints] workspace = true diff --git a/pyproject.toml b/pyproject.toml index 4e2cbed3174..481f4606f7c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ dynamic = ["version"] [tool.towncrier] filename = "CHANGELOG.md" -version = "0.28.1" +version = "0.28.2" 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 54e5e1971b3..8e5544c3feb 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.28.1/class.html#no-generic-parameters +error: #[pyclass] cannot have generic parameters. For an explanation, see https://pyo3.rs/v0.28.2/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.28.1/class.html#no-lifetime-parameters +error: #[pyclass] cannot have lifetime parameters. For an explanation, see https://pyo3.rs/v0.28.2/class.html#no-lifetime-parameters --> tests/ui/reject_generics.rs:9:27 | 9 | struct ClassWithLifetimes<'a> {