[issue12947] Examples in library/doctest.html lack the flags

2012-04-30 Thread Stefano Taschini

Stefano Taschini  added the comment:

Ezio, the patch I attached goes into that direction, by adding a 
":trim-doctest-flags: disable" option to the code blocks.

I thought I had a good reason for having the option worded as 
":trim-doctest-flags: disable" instead of ":keep-doctest-flags:", now I'm not 
so sure.

Note: the patch is against the 2.7 branch.

--
keywords: +patch
Added file: http://bugs.python.org/file25424/issue12947_v0.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12947] Examples in library/doctest.html lack the flags

2012-04-29 Thread Ezio Melotti

Ezio Melotti  added the comment:

Is there a way to add a :keep-doctest-flags: options to literal blocks?

--
stage: test needed -> needs patch
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12947] Examples in library/doctest.html lack the flags

2012-04-19 Thread Stefano Taschini

Stefano Taschini  added the comment:

As far as I can see, Sphinx has a global setting for trim_doctest_flags but 
lacks the possibility of locally disabling the trimming.

A quick workaround would be to have the following sphinx extension added:

class ProxyLexer(object):

def __init__(self, underlying):
self.__underlying = underlying

def __getattr__(self, attr):
return getattr(self.__underlying, attr)

def setup(app):
from sphinx.highlighting import lexers
if lexers is not None:
lexers['pycon-literal'] = ProxyLexer(lexers['pycon'])
lexers['pycon3-literal'] = ProxyLexer(lexers['pycon3'])

That would allow blocks marked as

.. code-block:: pycon-literal

or preceded by 

.. highlight:: pycon-literal

to escape the trimming of doctest flags.

If that's of any interest I can submit a patch.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12947] Examples in library/doctest.html lack the flags

2012-04-18 Thread Éric Araujo

Éric Araujo  added the comment:

Thank you.  I think it’s clear that for the docs of the doctest flags we need 
to display snippets with the flags.

--
resolution: invalid -> 
stage: committed/rejected -> test needed
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12947] Examples in library/doctest.html lack the flags

2012-04-18 Thread Stefano Taschini

Stefano Taschini  added the comment:

Concrete examples can be seen in the section

http://docs.python.org/library/doctest.html#option-flags-and-directives

For instance at

http://docs.python.org/library/doctest.html#doctest.IGNORE_EXCEPTION_DETAIL

The doctest flags present in the sources in 

http://docs.python.org/_sources/library/doctest.txt

are all stripped.

--
nosy: +taschini

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12947] Examples in library/doctest.html lack the flags

2011-09-09 Thread Georg Brandl

Georg Brandl  added the comment:

Hehe... Sphinx makes a point of *removing* doctest flags, to enable doctesting 
of code snippets without distracting the reader with the test-internal flags.

I think it's because you used a newer version locally.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12947] Examples in library/doctest.html lack the flags

2011-09-09 Thread Éric Araujo

Éric Araujo  added the comment:

Ezio prompted me to give precise examples, and I can’t find any in the docs 
online.  Maybe it was only a local build with certain options that caused this 
problem, I’ll reopen if I find out.

--
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12947] Examples in library/doctest.html lack the flags

2011-09-09 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12947] Examples in library/doctest.html lack the flags

2011-09-09 Thread Éric Araujo

New submission from Éric Araujo :

The docs for the doctest module contains examples that use doctest flags to 
control behavior, but the HTML version does not contain the flags, making the 
examples useless.

I don’t know if this is a bug with the HTML builder or something we can fix in 
markup.

--
assignee: docs@python
components: Documentation
messages: 143775
nosy: docs@python, eric.araujo, georg.brandl
priority: normal
severity: normal
status: open
title: Examples in library/doctest.html lack the flags
versions: Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com