From 76af1ed7a5b7ad76ab932f0e40feb2c28a19393b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Mon, 14 Jul 2025 10:47:15 +0200 Subject: [PATCH 1/3] Test current CI status From 890280a857595066f6171127a00d2e55c87f286d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Fri, 11 Jul 2025 14:16:35 +0200 Subject: [PATCH 2/3] Explicitly state template parameter --- src/binding/python/Series.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/binding/python/Series.cpp b/src/binding/python/Series.cpp index 2c51731f38..8cbee9a3f7 100644 --- a/src/binding/python/Series.cpp +++ b/src/binding/python/Series.cpp @@ -387,7 +387,10 @@ not possible once it has been closed. std::tuple, std::tuple #endif - >::template call(cl); + >::template call &>(cl); + // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + // need to explicitly state template parameters, otherwise Clang on + // Windows does not understand that it really is a template cl.def("__bool__", &Series::operator bool) .def("__len__", [](Series const &s) { return s.iterations.size(); }) From a3f494eb6a70d3fa2d87f7ed263b39ece860a69a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Mon, 14 Jul 2025 13:26:11 +0200 Subject: [PATCH 3/3] Fix deprecated pybind call --- include/openPMD/binding/python/Mpi.hpp | 2 +- src/binding/python/Attributable.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/openPMD/binding/python/Mpi.hpp b/include/openPMD/binding/python/Mpi.hpp index 5de6077f09..7b61128b7c 100644 --- a/include/openPMD/binding/python/Mpi.hpp +++ b/include/openPMD/binding/python/Mpi.hpp @@ -94,7 +94,7 @@ pythonObjectAsMpiComm(pybind11::object &comm) e_t::is_not_an_mpi_communicator}; // only checks same layout, e.g. an `int` in `PyObject` could pass this if (!py::isinstance >( - comm.get_type())) + py::type::of(comm))) // TODO add mpi4py version from above import check to error message return e{ "comm has unexpected type layout in " + comm_str + diff --git a/src/binding/python/Attributable.cpp b/src/binding/python/Attributable.cpp index 59131704c0..4107616556 100644 --- a/src/binding/python/Attributable.cpp +++ b/src/binding/python/Attributable.cpp @@ -275,7 +275,7 @@ template bool setAttributeFromObject_default( Attributable &attr, std::string const &key, py::object &obj) { - if (std::string(py::str(obj.get_type())) == "") + if (std::string(py::str(py::type::of(obj))) == "") { using ListType = std::vector; return attr.setAttribute(key, obj.cast()); @@ -289,7 +289,7 @@ bool setAttributeFromObject_default( bool setAttributeFromObject_double( Attributable &attr, std::string const &key, py::object &obj) { - if (std::string(py::str(obj.get_type())) == "") + if (std::string(py::str(py::type::of(obj))) == "") { using ListType = std::vector; using ArrayType = std::array; @@ -342,7 +342,7 @@ std::optional tryCast(py::object const &obj) { TargetType val{}; auto python_val = py::cast(std::move(val)); - if (!py::isinstance(obj, python_val.get_type())) + if (!py::isinstance(obj, py::type::of(python_val))) { return std::nullopt; }