File 0026-432-boostorg-python-numpy2.0.patch of Package ceph-ceph-17.2.9

diff --git a/src/boost/libs/python/src/numpy/dtype.cpp b/src/boost/libs/python/src/numpy/dtype.cpp
index 88a20a2..da30d19 100644
--- a/src/boost/libs/python/src/numpy/dtype.cpp
+++ b/src/boost/libs/python/src/numpy/dtype.cpp
@@ -98,7 +98,13 @@ python::detail::new_reference dtype::convert(object const & arg, bool align)
   return python::detail::new_reference(reinterpret_cast<PyObject*>(obj));
 }
 
-int dtype::get_itemsize() const { return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;}
+int dtype::get_itemsize() const {
+#if NPY_ABI_VERSION < 0x02000000
+  return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;
+#else
+  return PyDataType_ELSIZE(reinterpret_cast<PyArray_Descr*>(ptr()));
+#endif
+}
 
 bool equivalent(dtype const & a, dtype const & b) {
     // On Windows x64, the behaviour described on 
openSUSE Build Service is sponsored by