[issue11176] give more meaningful argument names in argparse documentation

2012-07-07 Thread Greg Roodt

Greg Roodt  added the comment:

Is this still an issue? If so, I've created a simpler first example as 
suggested below. 

If we decide these docs still need a bit more work, I can also continue to 
provide better examples than the "foo bar" ones.

--
keywords: +patch
nosy: +groodt
Added file: http://bugs.python.org/file26284/argparse_simple_example.diff

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



[issue15183] it should be made clear that the statement in the --setup option and the setup kw arg aren't included in the count

2012-07-07 Thread Greg Roodt

Greg Roodt  added the comment:

Confirmed that the setup statement is correctly excluded from the overall timed 
run.

I've updated the docstring and rst to make this clearer.

--
keywords: +patch
nosy: +groodt
Added file: http://bugs.python.org/file26288/timeit_setup_clarification.diff

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



[issue8823] urllib2 does not catch httplib.BadStatusLine

2012-07-07 Thread Greg Roodt

Greg Roodt  added the comment:

I've made a small change to urllib2 to catch the httplib.BadStatusLine and 
raise as URLError. This exception should rarely happen as it means the server 
is returning invalid responses. Nevertheless, I've added a test and hopefully 
fixed the issue.

Patch is attached. I will check if this needs to be added to newer versions of 
Python.

--
keywords: +patch
nosy: +groodt
Added file: http://bugs.python.org/file26298/bad_status_urlerror.diff

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



[issue5815] locale.getdefaultlocale() missing corner case

2012-07-07 Thread Greg Roodt

Greg Roodt  added the comment:

Bumping this as part of a bug scrub at EuroPython. Is this still an issue? 
Should we fix in docs or in code?

--
nosy: +groodt

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



[issue5931] Python runtime name hardcoded in wsgiref.simple_server

2012-07-07 Thread Greg Roodt

Greg Roodt  added the comment:

Bumping as part of bug scrub at EuroPython. Patch seems sensible to me. Obvious 
options to me are to either accept patch, close bug or write docs. Bug has not 
seen activity in years, so can probably be closed.

--
nosy: +groodt

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



[issue1076515] shutil.move clobbers read-only files.

2012-07-07 Thread Greg Roodt

Greg Roodt  added the comment:

I believe this can be closed.

shutil.copyfile attempts to copy file contents from src to dst, so it makes 
sense for this to fail if dst is read-only.

shutil.move replaces the dst, which is permitted based on directory permissions.

--
nosy: +groodt

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



[issue11176] give more meaningful argument names in argparse documentation

2012-07-09 Thread Greg Roodt

Greg Roodt  added the comment:

Hi David

Ok, I like the idea of working on a solution together. I like your idea of
the pizza-making more than the current "foo bar" examples.

Should we collaborate outside of the bug tracker?

Greg

On 9 July 2012 07:11, David Lam  wrote:

>
> David Lam  added the comment:
>
> haha wow, I was working on this bug too!  maybe we can work on the final
> patch together
>
> I got through about 2/3's of the docs, so I thought it might help to
> upload what I got so far.  I basically just made stuff up so I'm totally
> winning to change anything (or everything)
>
> I made a little effort to make the examples mildly amusing, since novelty
> sorta helps in retention.  So one of the recurring examples I used involves
> that of a pizza-making-program... hopefully this helps in some way!
>
> --
> nosy: +dlam
> Added file:
> http://bugs.python.org/file26325/issue11165-doc-fix-up-to-section-15.4.4.diff
>
> ___
> Python tracker 
> <http://bugs.python.org/issue11176>
> ___
>

--

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



[issue11176] give more meaningful argument names in argparse documentation

2012-07-09 Thread Greg Roodt

Greg Roodt  added the comment:

I've made the minor edits required after the review to my simplification of the 
first example.

David, perhaps we combine our efforts? Use my simple first example to explain 
the very basics, then continue the explanation with the pizza example?

Im happy either way, I quite like your example using the system dictionary.

--
Added file: http://bugs.python.org/file26334/1176_minor_edits.diff

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



[issue1076515] shutil.move clobbers read-only files.

2012-07-09 Thread Greg Roodt

Greg Roodt  added the comment:

I can add some more info to the docs if anybody feels they are required, but I 
think they are sufficient. It already mentions that it copies file contents and 
that the correct permissions are required.

This is mentioned in the docs for shutil.copyfile:

The destination location must be writable; otherwise, an OSError exception will 
be raised. If dst already exists, it will be replaced.

--

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



[issue8823] urllib2 does not catch httplib.BadStatusLine

2012-07-11 Thread Greg Roodt

Greg Roodt  added the comment:

By the way, the issue can be recreated by running the following:

netcat -l -p  -e "echo HTTP/1.1 1000 OK" &
python -c "import urllib2; urllib2.urlopen('http://localhost:')"

This happens on 2.6, 2.7 and 3 by the looks of it.

--

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