From 088c8c9c7ed7652c561240b7acc823957626f879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Mon, 19 Jan 2026 11:00:42 +0100 Subject: [PATCH 1/5] Bump versions for toml11 nlohmann_json pybind11 --- cmake/dependencies/json.cmake | 6 +++--- cmake/dependencies/pybind11.cmake | 6 +++--- cmake/dependencies/toml11.cmake | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmake/dependencies/json.cmake b/cmake/dependencies/json.cmake index 751ffc87f5..b35d094a84 100644 --- a/cmake/dependencies/json.cmake +++ b/cmake/dependencies/json.cmake @@ -56,10 +56,10 @@ set(openPMD_json_src "" "Local path to nlohmann_json source directory (preferred if set)") # tarball fetcher -set(openPMD_json_tar "https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz" +set(openPMD_json_tar "https://github.com/nlohmann/json/archive/refs/tags/v3.12.0.tar.gz" CACHE STRING "Remote tarball link to pull and build nlohmann_json from if(openPMD_USE_INTERNAL_JSON)") -set(openPMD_json_tar_hash "SHA256=0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406" +set(openPMD_json_tar_hash "SHA256=4b92eb0c06d10683f7447ce9406cb97cd4b453be18d7279320f7b2f025c10187" CACHE STRING "Hash checksum of the tarball of nlohmann_json if(openPMD_USE_INTERNAL_JSON)") @@ -67,7 +67,7 @@ set(openPMD_json_tar_hash "SHA256=0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018 set(openPMD_json_repo "https://github.com/nlohmann/json.git" CACHE STRING "Repository URI to pull and build nlohmann_json from if(openPMD_USE_INTERNAL_JSON)") -set(openPMD_json_branch "v3.11.3" +set(openPMD_json_branch "v3.12.0" CACHE STRING "Repository branch for openPMD_json_repo if(openPMD_USE_INTERNAL_JSON)") diff --git a/cmake/dependencies/pybind11.cmake b/cmake/dependencies/pybind11.cmake index 68c0986e4f..d092941d5c 100644 --- a/cmake/dependencies/pybind11.cmake +++ b/cmake/dependencies/pybind11.cmake @@ -67,10 +67,10 @@ set(openPMD_pybind11_src "" "Local path to pybind11 source directory (preferred if set)") # tarball fetcher -set(openPMD_pybind11_tar "https://github.com/pybind/pybind11/archive/refs/tags/v2.13.6.tar.gz" +set(openPMD_pybind11_tar "https://github.com/pybind/pybind11/archive/refs/tags/v3.0.1.tar.gz" CACHE STRING "Remote tarball link to pull and build pybind11 from if(openPMD_USE_INTERNAL_PYBIND11)") -set(openPMD_pybind11_tar_hash "SHA256=e08cb87f4773da97fa7b5f035de8763abc656d87d5773e62f6da0587d1f0ec20" +set(openPMD_pybind11_tar_hash "SHA256=741633da746b7c738bb71f1854f957b9da660bcd2dce68d71949037f0969d0ca" CACHE STRING "Hash checksum of the tarball of pybind11 if(openPMD_USE_INTERNAL_PYBIND11)") @@ -78,7 +78,7 @@ set(openPMD_pybind11_tar_hash "SHA256=e08cb87f4773da97fa7b5f035de8763abc656d87d5 set(openPMD_pybind11_repo "https://github.com/pybind/pybind11.git" CACHE STRING "Repository URI to pull and build pybind11 from if(openPMD_USE_INTERNAL_PYBIND11)") -set(openPMD_pybind11_branch "v2.13.6" +set(openPMD_pybind11_branch "v3.0.1" CACHE STRING "Repository branch for openPMD_pybind11_repo if(openPMD_USE_INTERNAL_PYBIND11)") diff --git a/cmake/dependencies/toml11.cmake b/cmake/dependencies/toml11.cmake index c1f8832a81..000e285a7f 100644 --- a/cmake/dependencies/toml11.cmake +++ b/cmake/dependencies/toml11.cmake @@ -64,10 +64,10 @@ set(openPMD_toml11_src "" "Local path to toml11 source directory (preferred if set)") # tarball fetcher -set(openPMD_toml11_tar "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.2.0.tar.gz" +set(openPMD_toml11_tar "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.4.0.tar.gz" CACHE STRING "Remote tarball link to pull and build toml11 from if(openPMD_USE_INTERNAL_TOML11)") -set(openPMD_toml11_tar_hash "SHA256=9287971cd4a1a3992ef37e7b95a3972d1ae56410e7f8e3f300727ab1d6c79c2c" +set(openPMD_toml11_tar_hash "SHA256=815bfe6792aa11a13a133b86e7f0f45edc5d71eb78f5fb6686c49c7f792b9049" CACHE STRING "Hash checksum of the tarball of toml11 if(openPMD_USE_INTERNAL_TOML11)") @@ -75,7 +75,7 @@ set(openPMD_toml11_tar_hash "SHA256=9287971cd4a1a3992ef37e7b95a3972d1ae56410e7f8 set(openPMD_toml11_repo "https://github.com/ToruNiina/toml11.git" CACHE STRING "Repository URI to pull and build toml11 from if(openPMD_USE_INTERNAL_TOML11)") -set(openPMD_toml11_branch "v3.7.1" +set(openPMD_toml11_branch "v4.4.0" CACHE STRING "Repository branch for openPMD_toml11_repo if(openPMD_USE_INTERNAL_TOML11)") From bc1817d09b56905a3538c63d43fb3ee951f4af24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Mon, 19 Jan 2026 14:42:44 +0100 Subject: [PATCH 2/5] tmp: try sth --- src/binding/python/Attributable.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/binding/python/Attributable.cpp b/src/binding/python/Attributable.cpp index 72876867f1..f9bd1c8f4b 100644 --- a/src/binding/python/Attributable.cpp +++ b/src/binding/python/Attributable.cpp @@ -614,14 +614,15 @@ void init_Attributable(py::module &m) // double, 7 > >) // C++ pass-through API: Getter - .def( - "get_attribute", - [](Attributable &attr, std::string const &key) { - auto v = attr.getAttribute(key); - return v.getVariant(); - // TODO instead of returning lists, return all arrays (ndim > 0) - // as numpy arrays? - }) + // .def( + // "get_attribute", + // [](Attributable &attr, std::string const &key) { + // auto v = attr.getAttribute(key); + // return v.getVariant(); + // // TODO instead of returning lists, return all arrays (ndim > + // 0) + // // as numpy arrays? + // }) .def_property_readonly( "attribute_dtypes", [](Attributable const &attributable) { From a63d52a14ac08c6fb1b2dd844ff3c7af0db5a828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Mon, 19 Jan 2026 14:46:14 +0100 Subject: [PATCH 3/5] Revert "tmp: try sth" This reverts commit bc1817d09b56905a3538c63d43fb3ee951f4af24. --- src/binding/python/Attributable.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/binding/python/Attributable.cpp b/src/binding/python/Attributable.cpp index f9bd1c8f4b..72876867f1 100644 --- a/src/binding/python/Attributable.cpp +++ b/src/binding/python/Attributable.cpp @@ -614,15 +614,14 @@ void init_Attributable(py::module &m) // double, 7 > >) // C++ pass-through API: Getter - // .def( - // "get_attribute", - // [](Attributable &attr, std::string const &key) { - // auto v = attr.getAttribute(key); - // return v.getVariant(); - // // TODO instead of returning lists, return all arrays (ndim > - // 0) - // // as numpy arrays? - // }) + .def( + "get_attribute", + [](Attributable &attr, std::string const &key) { + auto v = attr.getAttribute(key); + return v.getVariant(); + // TODO instead of returning lists, return all arrays (ndim > 0) + // as numpy arrays? + }) .def_property_readonly( "attribute_dtypes", [](Attributable const &attributable) { From db94df32ebfd3b58d344a6794ddf5a8a9ced886f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Mon, 19 Jan 2026 14:51:16 +0100 Subject: [PATCH 4/5] Return py::object instead of std::variant to pybind11 Pybind's variant handling explodes MSVC, so we do it instead. --- src/binding/python/Attributable.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/binding/python/Attributable.cpp b/src/binding/python/Attributable.cpp index 72876867f1..23795276ce 100644 --- a/src/binding/python/Attributable.cpp +++ b/src/binding/python/Attributable.cpp @@ -618,7 +618,9 @@ void init_Attributable(py::module &m) "get_attribute", [](Attributable &attr, std::string const &key) { auto v = attr.getAttribute(key); - return v.getVariant(); + return std::visit( + [](auto const &val) { return py::cast(val); }, + v.getVariant()); // TODO instead of returning lists, return all arrays (ndim > 0) // as numpy arrays? }) From 38bb16337d7369433734c2abadcde0d94f73323e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Mon, 19 Jan 2026 15:58:03 +0100 Subject: [PATCH 5/5] Revert Pybind to old version again --- cmake/dependencies/pybind11.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/dependencies/pybind11.cmake b/cmake/dependencies/pybind11.cmake index d092941d5c..68c0986e4f 100644 --- a/cmake/dependencies/pybind11.cmake +++ b/cmake/dependencies/pybind11.cmake @@ -67,10 +67,10 @@ set(openPMD_pybind11_src "" "Local path to pybind11 source directory (preferred if set)") # tarball fetcher -set(openPMD_pybind11_tar "https://github.com/pybind/pybind11/archive/refs/tags/v3.0.1.tar.gz" +set(openPMD_pybind11_tar "https://github.com/pybind/pybind11/archive/refs/tags/v2.13.6.tar.gz" CACHE STRING "Remote tarball link to pull and build pybind11 from if(openPMD_USE_INTERNAL_PYBIND11)") -set(openPMD_pybind11_tar_hash "SHA256=741633da746b7c738bb71f1854f957b9da660bcd2dce68d71949037f0969d0ca" +set(openPMD_pybind11_tar_hash "SHA256=e08cb87f4773da97fa7b5f035de8763abc656d87d5773e62f6da0587d1f0ec20" CACHE STRING "Hash checksum of the tarball of pybind11 if(openPMD_USE_INTERNAL_PYBIND11)") @@ -78,7 +78,7 @@ set(openPMD_pybind11_tar_hash "SHA256=741633da746b7c738bb71f1854f957b9da660bcd2d set(openPMD_pybind11_repo "https://github.com/pybind/pybind11.git" CACHE STRING "Repository URI to pull and build pybind11 from if(openPMD_USE_INTERNAL_PYBIND11)") -set(openPMD_pybind11_branch "v3.0.1" +set(openPMD_pybind11_branch "v2.13.6" CACHE STRING "Repository branch for openPMD_pybind11_repo if(openPMD_USE_INTERNAL_PYBIND11)")