Roundup Robot added the comment:
New changeset 00555659253d by Chris Jerdonek in branch '3.3':
Issue #12947: Divide doctest Option Flags and Directives section into two.
http://hg.python.org/cpython/rev/00555659253d
New changeset 467c9f663b77 by Chris Jerdonek in branch 'default':
Issue #12947:
Chris Jerdonek added the comment:
Yes, the workaround should be applied in those cases as well.
I added the workaround to the last remaining example. Nick was right before in
that three of the four examples I mentioned above were in the part about
option flags rather than in the part about
Roundup Robot added the comment:
New changeset 9057da41cf0b by Georg Brandl in branch '3.2':
Issue #12947: revert earlier workaround and use a monkey-patch to enable
showing doctest directives only in the doctest docs.
http://hg.python.org/cpython/rev/9057da41cf0b
New changeset 1202c1449d83 by
Roundup Robot added the comment:
New changeset ffe9f644d5af by Georg Brandl in branch '2.7':
Issue #12947: revert earlier workaround and use a monkey-patch to enable
showing doctest directives only in the doctest docs.
http://hg.python.org/cpython/rev/ffe9f644d5af
--
Chris Jerdonek added the comment:
Thanks, Georg. Can this new directive be applied to individual code blocks
though (or be modified to do so)?
After a closer review (as mentioned in my comment above), it seems that the
doctest directives should only be displayed in the code snippets that are
Georg Brandl added the comment:
I don't see any blocks in doctest.rst where the directives should be stripped,
so it's enough to do it per-file.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12947
Chris Jerdonek added the comment:
Like these that discuss the behavior of the doctest.IGNORE_EXCEPTION_DETAIL
option (but before doctest directives have been introduced):
http://hg.python.org/cpython/file/0d6910bef979/Doc/library/doctest.rst#l543
The key is that you can have options take
Chris Jerdonek added the comment:
Georg suggested removing the doctest directives from the examples I mentioned.
As currently written, they don't help them pass if doctest were run on the .rst
file. That sounds fine to me for now.
--
___
Python
Roundup Robot added the comment:
New changeset 705a70b0fff4 by Chris Jerdonek in branch '3.3':
Issue #12947: Remove doctest directives from the doctest examples in the
Option Flag section.
http://hg.python.org/cpython/rev/705a70b0fff4
New changeset 9475fc82768e by Chris Jerdonek in branch
Chris Jerdonek added the comment:
This seems to look good now. Can this be closed, or is there something else
that needed to be done as well?
--
resolution: - fixed
stage: needs patch - commit review
status: open - pending
___
Python tracker
Terry J. Reedy added the comment:
I looked at
http://docs.python.org/py3k/library/doctest.html#directives
and the examples with directives looked fine to me, with directive, syntax
markup, and 'hide prompt' box. I also checked the next section and saw the one
example that needed to have the
Nick Coghlan added the comment:
Ah, I see the other examples Chris is talking about now. Yes, the workaround
should be applied in those cases as well.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12947
Terry J. Reedy added the comment:
http://docs.python.org/py3k/library/doctest.html#option-flags-and-directives
has the improved version. Thanks. Here, the complete example text is more
important than the hi-lites.
--
___
Python tracker
Roundup Robot added the comment:
New changeset 662fb4bd5f84 by Nick Coghlan in branch '2.7':
Issue #12947: Add a note to doctest until the example rendering is fixed
http://hg.python.org/cpython/rev/662fb4bd5f84
--
nosy: +python-dev
___
Python
Roundup Robot added the comment:
New changeset 679b3e3aadae by Nick Coghlan in branch '3.3':
Issue #12947: Add a note to doctest until the example rendering is fixed
http://hg.python.org/cpython/rev/679b3e3aadae
--
___
Python tracker
Nick Coghlan added the comment:
Since the status quo is thoroughly confusing for readers, I added an explicit
note before the affected examples. That note should be removed once the
rendering problem is fixed. (The note is there on trunk as well, I just forgot
to include the issue number in
Chris Jerdonek added the comment:
I thought of an easy work-around we can use after looking at the changeset
Terry referenced above:
[2] https://bitbucket.org/birkenfeld/sphinx/changeset/d91bf8e465ef
At the expense of pretty color highlighting, we can enable Pygments' TextLexer
for the
Roundup Robot added the comment:
New changeset 18d927fb8671 by Nick Coghlan in branch '2.7':
Issue #12947: Better workaround for the problem with doctest directives being
stripped from code examples that are intended to illustrate those directives
http://hg.python.org/cpython/rev/18d927fb8671
Roundup Robot added the comment:
New changeset d93a59a0a984 by Nick Coghlan in branch '3.3':
Issue #12947: Better workaround for the problem with doctest directives being
stripped from code examples that are intended to illustrate those directives
http://hg.python.org/cpython/rev/d93a59a0a984
Nick Coghlan added the comment:
Adopted Chris's workaround for now. I kept a reworded version of the preceding
note (with the link to this bug), so readers know that the lack of syntax
highlighting is intended-but-not-desired.
--
___
Python tracker
Chris Jerdonek added the comment:
Thanks, Nick. It looks like there are a few more though? I'm counting four
more in default (search for doctest:): three IGNORE_EXCEPTION_DETAIL and one
ELLIPSIS.
--
___
Python tracker rep...@bugs.python.org
Nick Coghlan added the comment:
I only changed the ones that were specifically in the section explaining
doctest directives. There are probably others, but it didn't seem necessary to
change them and lose the syntax highlighting at this point.
--
Chris Jerdonek added the comment:
I discovered this today as well while reading the doctest documentation.
One thing that I never noticed before (and that doesn't seem to be reflected in
the comments above) is that many of the code snippet rectangles in the doctest
documentation have a small
Ezio Melotti added the comment:
Is this a feature? What is it for? :)
The is added to every example that contains an interactive session to hide
the '' and '...' prompts and the output and make the code copy/pastable, and
it's not specific to doctests.
--
Changes by Devin Jeanpierre jeanpierr...@gmail.com:
--
title: Examples in library/doctest.html lack the flags - doctest directive
examples in library/doctest.html lack the flags
___
Python tracker rep...@bugs.python.org
Changes by Sandro Tosi sandro.t...@gmail.com:
--
nosy: +sandro.tosi
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12947
___
___
Python-bugs-list
Terry J. Reedy tjre...@udel.edu added the comment:
The directives should normally be stripped, but not when they are intentionally
given to teach their existence, syntax, and use, as in the doctest doc on
directives.
I opened (and closed -- am trying to anyway) a duplicate, #14865. The
27 matches
Mail list logo