From 63fb93922ee515af9a320b4b398d2564fb35c8e3 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 2 Dec 2020 20:07:50 +0800 Subject: [PATCH] pybind/rados: use rados_set_pool_full_try instead of the deprecated one this change silences the warning when compiling the cythonized python binding: build/src/pybind/rados/pyrex/rados.c:64435:9: warning: 'rados_set_osdmap_full_try' is deprecated [-Wdeprecated-declarations] rados_set_osdmap_full_try(__pyx_v_self->io); ^~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Kefu Chai --- src/pybind/rados/rados.pyx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pybind/rados/rados.pyx b/src/pybind/rados/rados.pyx index ea66bd37a512..925a32312d1a 100644 --- a/src/pybind/rados/rados.pyx +++ b/src/pybind/rados/rados.pyx @@ -161,8 +161,8 @@ cdef extern from "rados/librados.h" nogil: int rados_getaddrs(rados_t cluster, char** addrs) int rados_application_enable(rados_ioctx_t io, const char *app_name, int force) - void rados_set_osdmap_full_try(rados_ioctx_t io) - void rados_unset_osdmap_full_try(rados_ioctx_t io) + void rados_set_pool_full_try(rados_ioctx_t io) + void rados_unset_pool_full_try(rados_ioctx_t io) int rados_application_list(rados_ioctx_t io, char *values, size_t *values_len) int rados_application_metadata_get(rados_ioctx_t io, const char *app_name, @@ -4172,14 +4172,14 @@ returned %d, but should return zero on success." % (self.name, ret)) Set global osdmap_full_try label to true """ with nogil: - rados_set_osdmap_full_try(self.io) + rados_set_pool_full_try(self.io) def unset_osdmap_full_try(self): """ Unset """ with nogil: - rados_unset_osdmap_full_try(self.io) + rados_unset_pool_full_try(self.io) def application_enable(self, app_name: str, force: bool = False): """ -- 2.47.3