Issue 13801: The Python 3 Docs don't highlight nonlocal (original) (raw)

Created on 2012-01-16 13:28 by Ramchandra Apte, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (10)
msg151362 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2012-01-16 13:28
The Python 3 Docs don't highlight nonlocal such as in the code example in the Python 3 documentation for itertools.zip_longest() (http://docs.python.org/py3k/library/itertools.html)
msg151365 - (view) Author: me (me) Date: 2012-01-16 14:31
Nonlocal is highlighted under Language Reference under simple statements section 6.13 (http://docs.python.org/dev/reference/index.html). help("nonlocal") will also bring up the documentation (works for me in 3.3).
msg151367 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-01-16 14:41
Not really. If you follow the link given in the first message and compare how “is” and “nonlocal” are styled, you will see the bug. :) I hope that Sphinx configures Pygments to use a Python3Lexer, not Python. Georg?
msg151368 - (view) Author: me (me) Date: 2012-01-16 14:48
Ahh yes I see it. Sorry about that.
msg151374 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2012-01-16 15:36
The problem was until very recently, pygments omitted the nonlocal keyword. We probably need to wait for another pygments release.
msg164639 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2012-07-04 06:10
What is the status of this bug?
msg169162 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-08-26 06:55
Sphinx is configured to use Python3Lexer (highlight_language is set to 'python3' in Doc/conf.py). 'nonlocal' is not highlighted because in the pygments version that we are using 'nonlocal' is missing in Python3Lexer.tokens['keywords'] see (Doc/tools/pygments/lexers/agile.py:196). If this is fixed in more recent pygments versions, we only have to update our version.
msg169163 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2012-08-26 08:12
> 'nonlocal' is not highlighted because in the pygments version that we are using 'nonlocal' is missing in Python3Lexer.tokens['keywords'] see (Doc/tools/pygments/lexers/agile.py:196). The nonlocal keyword has been added in Pygments 1.5. https://bitbucket.org/birkenfeld/pygments-main/src/972a251fa742/pygments/lexers/agile.py#cl-202
msg169164 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-08-26 10:07
Our version is 1.3.1. Georg said that this can be update after the 3.3 release.
msg171648 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2012-09-30 16:15
Pygments is now updated to 1.5pre.
History
Date User Action Args
2022-04-11 14:57:25 admin set github: 58009
2012-09-30 16:15:45 georg.brandl set status: open -> closedresolution: fixedmessages: +
2012-08-26 10:07:06 ezio.melotti set messages: + versions: + Python 3.4
2012-08-26 08:12:54 berker.peksag set nosy: + berker.peksagmessages: +
2012-08-26 06:55:59 ezio.melotti set messages: +
2012-07-04 06:10:45 Ramchandra Apte set messages: +
2012-01-16 18:52:09 sandro.tosi set nosy: + sandro.tosi
2012-01-16 15:36:07 benjamin.peterson set nosy: + benjamin.petersonmessages: +
2012-01-16 14:48:46 me set messages: +
2012-01-16 14:41:28 eric.araujo set nosy: + eric.araujotitle: The Python 3 Docs doesn't highlight nonlocal -> The Python 3 Docs don't highlight nonlocalmessages: + stage: needs patch
2012-01-16 14:31:40 me set nosy: + memessages: +
2012-01-16 13:31:11 ezio.melotti set nosy: + georg.brandl, ezio.melottiversions: - Python 3.1
2012-01-16 13:28:54 Ramchandra Apte set assignee: docs@pythonnosy: + docs@pythoncomponents: + Documentationversions: + Python 3.1, Python 3.2, Python 3.3
2012-01-16 13:28:29 Ramchandra Apte set title: The Python 3 Docs don't highlight nonlocal -> The Python 3 Docs doesn't highlight nonlocal
2012-01-16 13:28:04 Ramchandra Apte create