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/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)") 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? })