]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
pybind/rbd: move legacy_implicit_noexcept to rbd.pyx
authorKefu Chai <k.chai@proxmox.com>
Wed, 28 Jan 2026 02:58:31 +0000 (10:58 +0800)
committerKefu Chai <k.chai@proxmox.com>
Wed, 28 Jan 2026 08:08:03 +0000 (16:08 +0800)
commitebe40180d5322f109fe4c8ce800cf72f462c4f11
tree096200529e413e6a53fdd138708785c24ade1f3b
parent2a5ac082800244d145e222fa606d3544ee506759
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