]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
pybind/rbd: move legacy_implicit_noexcept to rbd.pyx wip-pr-67045-kefu-7
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 03:03:33 +0000 (11:03 +0800)
commitfc36bd8ab6f7cd7bf16c75ab693547763bf39c3f
tree6f0023f64070c00f72c1e8cbedb53c3f373f7b4f
parent3a37967517ad779ac3fc466928e88898a3240975
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