From d098b8d7b031f21c8c48d5e00094155824917167 Mon Sep 17 00:00:00 2001 From: Rangsiman Ketkaew Date: Wed, 29 Oct 2025 15:20:09 +0100 Subject: [PATCH 1/2] Enhance: edit doc py::native_enum feature in upgrade.rst Added information about the inclusion requirement for py::native_enum feature. --- docs/upgrade.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/upgrade.rst b/docs/upgrade.rst index 9b373fc268..3bbe2c2709 100644 --- a/docs/upgrade.rst +++ b/docs/upgrade.rst @@ -47,6 +47,7 @@ Also new in v3.0 is ``py::native_enum``, a modern API for exposing C++ enumerations as native Python types — typically standard-library ``enum.Enum`` or related subclasses. This provides improved integration with Python's enum system, compared to the older (now deprecated) ``py::enum_``. +One also has to include ``#include `` in the source file. See `#5555 `_ for details. Functions exposed with pybind11 are now pickleable. This removes a From 5f337b8c8562cb4040d314dcf55fbf5688c4f370 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Mon, 10 Nov 2025 15:25:44 -0800 Subject: [PATCH 2/2] [skip ci] Polish wording --- docs/upgrade.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/upgrade.rst b/docs/upgrade.rst index 3bbe2c2709..966a319a80 100644 --- a/docs/upgrade.rst +++ b/docs/upgrade.rst @@ -47,8 +47,9 @@ Also new in v3.0 is ``py::native_enum``, a modern API for exposing C++ enumerations as native Python types — typically standard-library ``enum.Enum`` or related subclasses. This provides improved integration with Python's enum system, compared to the older (now deprecated) ``py::enum_``. -One also has to include ``#include `` in the source file. See `#5555 `_ for details. +Note that ``#include `` is not included automatically +and must be added explicitly. Functions exposed with pybind11 are now pickleable. This removes a long-standing obstacle when using pybind11-bound functions with Python features