[issue16154] Some minor doc fixes in Doc/library

2013-01-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9b3d0bdb9256 by Ezio Melotti in branch '2.7':
#16154: fix some doctests in Doc/library.  Patch by Ravi Sinha.
http://hg.python.org/cpython/rev/9b3d0bdb9256

New changeset 5b405df8518d by Ezio Melotti in branch '3.2':
#16154: fix some doctests in Doc/library.  Patch by Ravi Sinha.
http://hg.python.org/cpython/rev/5b405df8518d

New changeset 3e884b3804b3 by Ezio Melotti in branch '3.3':
#16154: merge with 3.2.
http://hg.python.org/cpython/rev/3e884b3804b3

New changeset 5ec8daab477a by Ezio Melotti in branch 'default':
#16154: merge with 3.3.
http://hg.python.org/cpython/rev/5ec8daab477a

--
nosy: +python-dev

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



[issue16154] Some minor doc fixes in Doc/library

2013-01-10 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report and the patch!

--
assignee: docs@python - ezio.melotti
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue16154] Some minor doc fixes in Doc/library

2013-01-06 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti
stage:  - patch review

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



[issue16154] Some minor doc fixes in Doc/library

2012-10-21 Thread Ravi Sinha

Changes by Ravi Sinha rss1...@gmail.com:


Added file: http://bugs.python.org/file27649/27.doc_lib_Oct21_2012.patch

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



[issue16154] Some minor doc fixes in Doc/library

2012-10-21 Thread Ravi Sinha

Changes by Ravi Sinha rss1...@gmail.com:


Added file: http://bugs.python.org/file27650/32.doc_lib_Oct21_2012.patch

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



[issue16154] Some minor doc fixes in Doc/library

2012-10-21 Thread Ravi Sinha

Changes by Ravi Sinha rss1...@gmail.com:


Added file: http://bugs.python.org/file27651/33.doc_lib_Oct21_2012.patch

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



[issue16154] Some minor doc fixes in Doc/library

2012-10-21 Thread Ravi Sinha

Ravi Sinha added the comment:

Based on what I saw on some other issues, I think there is just a separate 
patch for each version (coming from separate working repositories), but all 
attached to the same issue. So I am doing the same. All the changes have been 
made to files under Doc/library/ - colorsys.rst, filecmp.rst, fractions.rst, 
math.rst, string.rst and Misc/ACKS. The beginning number for each patch and the 
description show which version it's meant for.

There are some minor differences for 2.7 and 3.2; they either did not need a 
fix or needed some more tests to be skipped.

For 2.7 and 3.2 I don't know how to use the online source browser to link the 
files directly.

Please let me know if the patches are okay or how to go from here. 
Thanks.

--

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



[issue16154] Some minor doc fixes in Doc/library

2012-10-14 Thread Ravi Sinha

Ravi Sinha added the comment:

I've used the testsetup directive and the problem in 
http://hg.python.org/cpython/file/40a1652349e9/Doc/library/math.rst, line 79, 
is fixed; the test passes

Added # doctest: +SKIP to lines 179 and 180 in 
http://hg.python.org/cpython/file/40a1652349e9/Doc/library/filecmp.rst, and it 
passes too

For http://hg.python.org/cpython/file/40a1652349e9/Doc/library/string.rst, 
lines 612-624, used +NORMALIZE_WHITESPACE and the test passed, but since Terry 
preferred a code change, did that too; the test passes

Put my name at the proper position in Misc/ACKS

For the multiple versions, I needed to ask whether they'd all belong to this 
same patch or there would be different patches for each version? Sorry if it's 
a silly question; I haven't had the time to wrap my head around how to best 
work with all the versions together 

With the directives Chris and Terry suggested, it should be easy to make 
several other tests pass; I'll make a few more patches

--
Added file: http://bugs.python.org/file27574/doc_lib_Oct14_2012.patch

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



[issue16154] Some minor doc fixes in Doc/library

2012-10-07 Thread Chris Jerdonek

Chris Jerdonek added the comment:

 fsum will pass if 'from math import fsum' is done before it, but I've left 
 such issues for now since there seems to be a debate about how to go about 
 that

For now, you can at least use the testsetup directive which will 
simultaneously allow the doctests to pass but cause the subsequent lines to be 
hidden in the rendered HTML.  We can always remove the directive at a later 
date to cause it to display.  See here for an example:

http://bugs.python.org/review/15888/diff/6011/Doc/howto/ipaddress.rst

 - some seem unfixable too

Can you include links to the questionable areas for examples like these (e.g. 
using the browse source page http://hg.python.org/cpython/file/default/ )?  
This will make it easier to reference and discuss.

--

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



[issue16154] Some minor doc fixes in Doc/library

2012-10-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I consider some items to be errors. In any case, all current docs can be fixed. 
First, your questions as to what you did not fix.

fsum: I personally would add the import visibly, but at least add it hidden, as 
Chris suggested.

171  from filecmp import dircmp
172  def print_diff_files(dcmp):
173 ... for name in dcmp.diff_files:
174 ... print(diff_file %s found in %s and %s % (name, dcmp.left,
175 ... dcmp.right))
176 ... for sub_dcmp in dcmp.subdirs.values():
177 ... print_diff_files(sub_dcmp)
178 ...
179  dcmp = dircmp('dir1', 'dir2')
180  print_diff_files(dcmp)

(copying from the repository view deletes whitespace)
The import and def should run and should be tested.
The last 2 lines should not be tested: add #doctest: SKIP to both.
(I gather that Sphinx will strip this.)

width = 5
for num in range(5,12):
   ... for base in 'dXob':
   ... print('{0:{width}{base}}'.format(num, base=base, width=width), 
end=' ')
   ... print()
   ...
   5 5 5   101
   6 6 6   110
   7 7 7   111
   8 810  1000
   9 911  1001
  10 A12  1010
  11 B13  1011

I believe the problem here is the end = '' part. It puts a blank space at the 
end of each line, which got deleted when I pasted the above, which was cut from 
my local repository. Trailing blanks are *really* a problem and code that 
produces them is not a good example. I suggest changing width to 6, end to '', 
and adding '' to the beginning of each output line. It should then pass.

--
type: enhancement - behavior
versions: +Python 2.7, Python 3.2, Python 3.3

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



[issue16154] Some minor doc fixes in Doc/library

2012-10-07 Thread Chris Jerdonek

Chris Jerdonek added the comment:

 Trailing blanks are *really* a problem

The NORMALIZE_WHITESPACE doctest directive is another option to deal with cases 
like these.  It ignores whitespace-only differences between the actual and 
expected outputs.  Does it pass with that directive?

--

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



[issue16154] Some minor doc fixes in Doc/library

2012-10-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Now your patch:

colorsys: same change all versions
fractions: ditto
Template: ditto

I believe the changes I suggested for filecmp and the numbers should also be 
the same in all versions.

ACKS: your name should be inserted in alpha order

--

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



[issue16154] Some minor doc fixes in Doc/library

2012-10-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I considered the directive, but I mildly prefer the code change.

end = ' ')  guarantees a blank between fields
even if one formats a too-large number
end = '')  does not add a blank to the end.
end = '' if base == 'b' else ' ')  does both (but depends on having a
  'last field' condition.

I actual practice, I might use the third option.
However, if you do the commit, it is your choice.

--

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



[issue16154] Some minor doc fixes in Doc/library

2012-10-07 Thread Chris Jerdonek

Chris Jerdonek added the comment:

 I considered the directive, but I mildly prefer the code change.

I just wanted to point the directive out as an available option (especially for 
Ravi if he does further patches like this).  Either way is fine with me.

--

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



[issue16154] Some minor doc fixes in Doc/library

2012-10-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Apparently, I should have suggested # doctest: +SKIP.
The #12947 fix to example directives being deleted from the directive examples 
came after the 3.3.0 release. Fixed examples are at
http://docs.python.org/py3k/library/doctest.html#option-flags-and-directives

--

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



[issue16154] Some minor doc fixes in Doc/library

2012-10-06 Thread Ravi Sinha

New submission from Ravi Sinha:

- Doc/library/math.rst - fsum will pass if 'from math import fsum' is done 
before it, but I've left such issues for now since there seems to be a debate 
about how to go about that
- some seem unfixable too - e.g. Doc/library/filecmp.rst - 'dir1' and 
'dir2' do not exist, and so the print_diff_files() fails, but there seems to be 
no reason to fix this; the same for Doc/library/imghdr.rst - there is no 
/tmp/bass.gif, so it fails
- some fail for inexplicable reasons - Doc/library/string.rst - the 
table of numbers does not match, though it is exactly the same. No idea why.

--
assignee: docs@python
components: Documentation
files: doc_lib.patch
keywords: patch
messages: 172253
nosy: Ravi.Sinha, chris.jerdonek, docs@python, r.david.murray, terry.reedy
priority: normal
severity: normal
status: open
title: Some minor doc fixes in Doc/library
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file27462/doc_lib.patch

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