Skip to content

Commit 17a57ed

Browse files
doc/conf: work around __annotate_func__ sphinx autodoc errors on Python 3.14
On Python3.14, sphinx 8.2.3 stumbles upon __annotate_func__ members: WARNING: autodoc: failed to import 'UDisks2Device.__annotate_func__' from module 'labgrid.util.agents.udisks2'; the following exception was raised: Traceback (most recent call last): File "sphinx/sphinx/util/inspect.py", line 461, in safe_getattr return getattr(obj, name, *defargs) AttributeError: type object 'UDisks2Device' has no attribute '__annotate_func__' This will be fixed once [1] is part of a release. Until then, exlcude the member from autodoc. [1] sphinx-doc/sphinx@7814844 Signed-off-by: Bastian Krause <bst@pengutronix.de>
1 parent 417ace6 commit 17a57ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,12 @@
175175
# -- Options for autodoc --------------------------------------------------
176176

177177
autodoc_member_order = 'bysource'
178+
# TODO: __annotate_func__ can be dropped once
179+
# https://github.com/sphinx-doc/sphinx/commit/78148440556d3e5962771c1025c85b253ccd73c8
180+
# is part of a sphinx release
178181
autodoc_default_options = {
179182
'special-members': True,
183+
'exclude-members': '__annotate_func__',
180184
}
181185
autodoc_mock_imports = ['onewire',
182186
'gi',

0 commit comments

Comments
 (0)