]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/rbd: move legacy_implicit_noexcept to rbd.pyx 67045/head
authorKefu Chai <k.chai@proxmox.com>
Wed, 28 Jan 2026 02:58:31 +0000 (10:58 +0800)
committerKefu Chai <k.chai@proxmox.com>
Thu, 29 Jan 2026 00:45:50 +0000 (08:45 +0800)
commite2ea24c5a7d5f405f14b7de8fea18ea24cb9e223
treee4a4d7b1256da89fe8310f967456b4338eb2e8b6
parent0423b771b7505e4410a6317f692f495c32864df8
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