Hello,
Le 20/01/2023 à 15:33, Andreas Tille a écrit :
I finally do not have an idea how to replace:
Handler <function mangle_docstrings at 0x7fa9a393e3e0> for event 'autodoc-process-docstring' threw an exception (exception: 'FullArgSpec' object has no attribute 'replace')
which you can find in the latest build log in Salsa CI.
tl;dr: replace the body of the try block with this:
argspec = inspect.signature(inspect.getframeinfo)
argspec = str(argspec).replace('*', '\\*')
signature = '%s%s' % (func_name, argspec)
The code does a string replace so that `*` characters in the function
signature (used for variadic args, variadic keyword args and separating keyword-only args) get escaped to prevent interpretation by Sphinx as
emphasis markup.
The inspect.getfullargspec function returns a special object (a named
tuple), not a string. On the commented line in the patch, we see a call
to format.formatargspec which was meant to turn the FullArgSpec into a
string, but that function has been deprecated since 3.5, with an error
message pointing to the newer, better API: function signatures.
Cheers
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)