[Python-Dev] Sphinx version for Python 2.x docs
matrixhasu at gmail.com
Tue Jan 17 19:02:13 CET 2012
On Mon, Jan 16, 2012 at 16:42, Éric Araujo <merwok at netwok.org> wrote:
> Le 14/01/2012 15:31, Sandro Tosi a écrit :
>> On Sat, Jan 14, 2012 at 04:24, Éric Araujo <merwok at netwok.org> wrote:
>>>> Doc/glossary.rst:520: WARNING: unknown keyword: nonlocal
>>> That’s a mistake I did in cefe4f38fa0e. This sentence should be removed.
>> Do you mean revert this whole hunk:
>> or just "The :keyword:`nonlocal` allows writing to outer scopes."?
> My proposal was to remove just that one last sentence, but the only
> other change in the diff hunk is the addition of “by default”, which is
> connected to the existence of nonlocal. Both changes, i.e. the whole
> hunk, should be reverted (I think I’ll have time to do that today).
I've reverted it with ef1612a6a4f7
>>>> Doc/library/stdtypes.rst:2372: WARNING: more than one target found for
>>>> cross-reference u'next':
>>> Need to use :meth:`.next` to let Sphinx find the right target (more info
>>> on request :)
>> it seems what it needed to was :meth:`next` (without the dot). The
>> current page links all 'next' in file.next() to functions.html#next,
>> and using :meth:`next` does that.
> I should have given more info, as I wanted the opposite result :)
> file.next should not link to the next function but to the file.next
> method. Because Sphinx does not differentiate between
> meth/func/class/mod roles, :meth:`next` is not resolved to the nearest
> next method as one could expect but to the next function, so we have to
> use :meth:`~SomeClass.next` or :meth:`.next` (local ref markup) to get
> our links to methods.
I tried :meth:`.next` but got a lots of :
/home/morph/cpython/py27/Doc/library/stdtypes.rst:2372: WARNING: more
than one target found for cross-reference u'next': iterator.next,
multifile.MultiFile.next, csv.csvreader.next, dbhash.dbhash.next,
mailbox.oldmailbox.next, ttk.Treeview.next, nntplib.NNTP.next,
file.next, bsddb.bsddbobject.next, tarfile.TarFile.next,
so I ended up with :meth:`next` but it was still wrong. I've committed
51e11b4937b7 which uses :meth:`~file.next` instead, and it works.
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
More information about the Python-Dev