Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #14855 > unrolled 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)

Started byÉric Araujo <merwok@netwok.org>
First post2023-01-20 22:10 +0100
Last post2023-01-21 09:20 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.debian.maint.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

#14855 — 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)

FromÉric Araujo <merwok@netwok.org>
Date2023-01-20 22:10 +0100
SubjectRe: 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)
Message-ID<FQ6O5-1OvN-9@gated-at.bofh.it>
   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

[toc] | [next] | [standalone]


#14856 — 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)

FromFC Stegerman <flx@obfusk.net>
Date2023-01-20 22:30 +0100
SubjectRe: 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)
Message-ID<FQ77r-1OCd-23@gated-at.bofh.it>
In reply to#14855
* Éric Araujo <merwok@netwok.org> [2023-01-20 22:01]:
> 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)

Should that not use "func" instead of "inspect.getframeinfo"?

    argspec = inspect.signature(func)
    argspec = str(argspec).replace('*', '\\*')
    signature = '%s%s' % (func_name, argspec)

- FC

[toc] | [prev] | [next] | [standalone]


#14857

FromÉric Araujo <merwok@netwok.org>
Date2023-01-20 22:30 +0100
Message-ID<FQ77r-1OCd-21@gated-at.bofh.it>
In reply to#14856
Le 20/01/2023 à 16:21, FC Stegerman a écrit :
> Should that not use "func" instead of "inspect.getframeinfo"?

Yes of course!  I tested in a terminal to give valid code and forgot to 
replace my example function with the original variable name.  Thanks!

[toc] | [prev] | [next] | [standalone]


#14858 — 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)

FromAndreas Tille <andreas@an3as.eu>
Date2023-01-21 09:20 +0100
SubjectRe: 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)
Message-ID<FQhgt-4dP-7@gated-at.bofh.it>
In reply to#14857
Am Fri, Jan 20, 2023 at 04:24:07PM -0500 schrieb Éric Araujo:
> Le 20/01/2023 à 16:21, FC Stegerman a écrit :
> > Should that not use "func" instead of "inspect.getframeinfo"?
> 
> Yes of course!  I tested in a terminal to give valid code and forgot to
> replace my example function with the original variable name.  Thanks!

Thanks to both of you
    Andreas. 

-- 
http://fam-tille.de

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web