Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #14855
| From | Éric Araujo <merwok@netwok.org> |
|---|---|
| Newsgroups | linux.debian.maint.python |
| Subject | Re: Help with numpydoc needed (Was: Bug#1029245: nitime: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.10 3.11" returned exit code 13) |
| Date | 2023-01-20 22:10 +0100 |
| Message-ID | <FQ6O5-1OvN-9@gated-at.bofh.it> (permalink) |
| References | <FPXrt-1IEg-29@gated-at.bofh.it> <FQ6l3-1O6j-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.debian.maint.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Help with numpydoc needed (Was: Bug#1029245: nitime: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.10 3.11" returned exit code 13) Éric Araujo <merwok@netwok.org> - 2023-01-20 22:10 +0100
Re: Help with numpydoc needed (Was: Bug#1029245: nitime: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.10 3.11" returned exit code 13) FC Stegerman <flx@obfusk.net> - 2023-01-20 22:30 +0100
Re: Help with numpydoc needed (Was: Bug#1029245: nitime: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.10 3.11" returned exit code 13) Éric Araujo <merwok@netwok.org> - 2023-01-20 22:30 +0100
Re: Help with numpydoc needed (Was: Bug#1029245: nitime: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.10 3.11" returned exit code 13) Andreas Tille <andreas@an3as.eu> - 2023-01-21 09:20 +0100
csiph-web