This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: three code examples in docs are not syntax highlighted
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: Ramchandra Apte, docs@python, eric.araujo, ezio.melotti, georg.brandl, python-dev, tshepang
Priority: normal Keywords: patch

Created on 2012-04-09 14:27 by Ramchandra Apte, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
highlight-code.diff tshepang, 2012-04-13 17:42 review
Messages (6)
msg157845 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2012-04-09 14:27
Three code examples in http://docs.python.org/py3k/library/multiprocessing.html#examples are not syntax highlighted.
msg158216 - (view) Author: Tshepang Lekhonkhobe (tshepang) * Date: 2012-04-13 17:42
This is probably because Sphinx can't detect that those are Python sources, so my patch forces it to recognize it as such.
msg158221 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-04-13 17:52
LGTM
msg158247 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-04-14 02:52
New changeset 635966f6d3de by Ezio Melotti in branch '3.2':
#14535: fix code highlight in multiprocessing examples.  Patch by Tshepang Lekhonkhobe.
http://hg.python.org/cpython/rev/635966f6d3de

New changeset 957e2c71beef by Ezio Melotti in branch 'default':
#14535: merge with 3.2.
http://hg.python.org/cpython/rev/957e2c71beef
msg158248 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-04-14 02:56
I tried the attached patch but it didn't work for me.  Using "python3" instead of "python" seemed to fix the problem.  I also updated another "python" to use "python3".  Thanks for the report and the patch!
msg158250 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2012-04-14 06:40
Ezio: That's a "bug" in Sphinx; even when the language is selected explicitly as "python", it will try to parse the code. It is fixed in a later Sphinx version.
History
Date User Action Args
2022-04-11 14:57:28adminsetgithub: 58740
2012-04-14 06:40:06georg.brandlsetnosy: + georg.brandl
messages: + msg158250
2012-04-14 02:56:03ezio.melottisetstatus: open -> closed

type: enhancement
assignee: docs@python -> ezio.melotti

nosy: + ezio.melotti
messages: + msg158248
resolution: fixed
stage: commit review -> resolved
2012-04-14 02:52:42python-devsetnosy: + python-dev
messages: + msg158247
2012-04-13 17:52:01eric.araujosetnosy: + eric.araujo

messages: + msg158221
stage: commit review
2012-04-13 17:42:26tshepangsetfiles: + highlight-code.diff
keywords: + patch
messages: + msg158216
2012-04-13 17:22:03tshepangsetnosy: + tshepang
2012-04-09 14:27:44Ramchandra Aptecreate