-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Description
Bug report
When building the documentation for pyOpenMS (after switching from Cython to nanobind) we ran into issues with Sphinx. I put here the analysis from an agent. Would be great if you could confirm if this should be fixed in nanobind or CPython.
Enums created with nb::is_arithmetic() inherit from Python’s int, which exposes methods like from_bytes() and to_bytes() on every enum type. These inherited methods carry CPython’s C-level docstrings, which contain malformed RST markup - specifically, backtick-apostrophe patterns like sys.byteorder' instead of sys.byteorder`.
When Sphinx autodoc processes these enums, it emits dozens of warnings:
WARNING: Inline interpreted text or phrase reference start-string without end-string [docutils]
Bug description:
CPython versions tested on:
3.14, 3.12, 3.10, 3.11, 3.13
Operating systems tested on:
Linux