]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
pybind/rbd: move legacy_implicit_noexcept to rbd.pyx wip-bharath5-testing-2026-01-28-2018
authorKefu Chai <k.chai@proxmox.com>
Wed, 28 Jan 2026 02:58:31 +0000 (10:58 +0800)
committerskanta <skanta@redhat.com>
Wed, 28 Jan 2026 15:14:35 +0000 (20:44 +0530)
commit32123298011481bfc87d3abb64da44e6b4868e99
treedb0e7a9ec27949837714c49987876dc9fd838534
parent39601e7dc83f2803103123ba041ff507fcf9c44d
pybind/rbd: move legacy_implicit_noexcept to rbd.pyx

Move the legacy_implicit_noexcept compiler directive from setup.py to
the top of rbd.pyx, making it consistent with how CephFS handles this
directive. This simplifies the build setup by:

- Removing conditional logic based on Cython version in setup.py
- Eliminating the need for compiler_directives dict and packaging import
- Making RBD's directive handling consistent with other bindings

The directive is needed for building with both Cython 0.x and Cython 3
from the same file while preserving the same behavior. Cython safely
ignores unknown compiler directives when specified at the top of .pyx
files, so this works across all supported Cython versions.

When Cython 0.x support is eventually dropped, this directive can be
replaced with explicit noexcept annotations on rbd_callback_t and
librbd_progress_fn_t type definitions.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/pybind/rbd/rbd.pyx
src/pybind/rbd/setup.py