On 06/13/2011 10:03 PM, Jakub Wilk wrote:
> * Nikolaus Rath <nikol...@rath.org>, 2011-06-13, 15:33:
>> Would it be possible to backport the following two changesets from
>> Sphinx 1.1pre into the debian sphinx package?
>>
>> https://bitbucket.org/birkenfeld/sphinx/changeset/de340a6098c7
>> https://bitbucket.org/birkenfeld/sphinx/changeset/a8b0ef275438
>>
>> (discussion at https://bitbucket.org/birkenfeld/sphinx/issue/564).
>>
>> I would like to add a python-llfuse package (ITP 626658) to unstable,
>> which depends on this feature for building the documentation.
> 
> Feel free to commit the required changes to the repository. If you are
> at it, please make sure that the feature is disabled by default, as I'd
> like not to diverge from upstream 1.0.7 more than it's necessary.

I have committed a patch but not yet enabled it.

There is a problem with disabling it by default. Even the latest
upstream revision fails if the default is set to False:

Change

    app.add_config_value('autodoc_docstring_signature', True, True)

to

    app.add_config_value('autodoc_docstring_signature', False, True)

And an unrelated test will abort with

======================================================================
FAIL: test_autodoc.test_generate
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/nose/case.py", line 187, in runTest
    self.test(*self.arg)
  File "/home/nikratio/tmp/sphinx/tests/test_autodoc.py", line 486, in
test_generate
    assert_processes([('function', 'time.asctime')], 'function', 'asctime')
  File "/home/nikratio/tmp/sphinx/tests/test_autodoc.py", line 351, in
assert_processes
    assert_works(objtype, name, **kw)
  File "/home/nikratio/tmp/sphinx/tests/test_autodoc.py", line 345, in
assert_works
    assert len(_warnings) == 0, _warnings
AssertionError: ["error while formatting arguments for time.asctime:
<method-wrapper '__init__' of builtin_function_or_method object at
0x7f1f5b049a28> is not a Python function"]

----------------------------------------------------------------------


I stared at this for quite a while, but I don't understand what's going on.

I think we have to wait for upstream to fix this bug, or just accept
upstream's default. Would the later be possible? Note that this patch
really only becomes effective if Sphinx did not find any other way to
retrieve a signature, and the first line of the docstring matches the
regular expression of a function signature. So I believe it's really
unlikely for things to go wrong by accident.


Best,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to