[Python-Dev] weird docstring generated by argument clinic (original) (raw)

Stefan Behnel stefan_ml at behnel.de
Thu Jan 30 07:25:01 CET 2014


Hi,

for two days now, the signature embedding tests in Cython have been failing with this (doctest) error:

""" Expected: f_D(long double D) -> long double Got: f_DNone f_D(long double D) -> long double """

https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests/1869/ARCH=m64,BACKEND=c,PYVERSION=py3km/testReport/junit/doctest/DocTestCase/Doctest__embedsignatures/

The first line that Cython writes into the docstring is the "expected" one above. So far, all CPython versions have ignored it, Py3.4 then started picking it up at some point due to the argument clinic changes, but properly copied it over to the (IIRC) "signature" attribute. However, the recent change now lead to the above being dumped into the docstring.

Could someone please quickly explain what the purpose of the first line is and why it says "None" at the end?

Is there anything we should do on our side in order to fix this? Since many of our users embed their signatures for documentation purposes (it was the only way to make them visible in previous CPython versions and is supported by several tools, e.g. epydoc), this is a rather annoying result for them.

Stefan



More information about the Python-Dev mailing list