[issue17761] platform._parse_release_file doesn't close the /etc/lsb-release file, doesn't know about 'Ubuntu'

2013-09-18 Thread Dmitry Shachnev

Changes by Dmitry Shachnev :


--
nosy: +mitya57

___
Python tracker 

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



[issue19038] Fix sort order in Misc/ACKS.

2013-09-18 Thread Georg Brandl

Georg Brandl added the comment:

Well, it is customary for the patch submitter to make the diff.  This makes it 
much easier for us to review.

Closing for now; please note our suggestions and reopen/resubmit as a diff file 
if you feel like it.

--
status: open -> closed

___
Python tracker 

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



[issue18855] Inconsistent README filenames

2013-09-18 Thread Georg Brandl

Georg Brandl added the comment:

AFAIR renaming the lowercased versions might lead to trouble with hg on 
case-insensitive file systems. Anyone know if that's still the case?

Otherwise README.txt is fine.  Although, Windows users will then complain about 
the Unix-style line endings because the files will be opened with Notepad by 
default :|

--
nosy: +georg.brandl

___
Python tracker 

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



[issue19038] Fix sort order in Misc/ACKS.

2013-09-18 Thread Tae-Wong SEO

Tae-Wong SEO added the comment:

Your Gmail account tried to send spam for this account.

Be careful with this message. Many people marked similar messages as spam.

Open this bug and have someone made a diff file to fix sort order.

--

___
Python tracker 

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



[issue19032] __reduce_ex__ on lock object

2013-09-18 Thread Ram Rachum

Changes by Ram Rachum :


--
status: open -> closed

___
Python tracker 

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



[issue19039] sphinx search, result sorting

2013-09-18 Thread Georg Brandl

Georg Brandl added the comment:

Searching in headings is implemented in Sphinx 1.2 (soon to be released).  
We'll switch to that version at least for 3.3 and 3.4 when it's out, so you 
will get the result for the heading there.

The PyOS_snprintf will still be the first result, since results in "object 
names" are always the first preference.  But the second preference will be 
heading names.

--
resolution:  -> later
status: open -> closed

___
Python tracker 

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



[issue19038] Fix sort order in Misc/ACKS.

2013-09-18 Thread Tae-Wong SEO

Tae-Wong SEO added the comment:

New diff file to change Bozon's last name.

--
keywords: +patch
status: closed -> pending
Added file: http://bugs.python.org/file31807/ACKS.diff

___
Python tracker 

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



[issue19039] sphinx search, result sorting

2013-09-18 Thread Georg Brandl

Georg Brandl added the comment:

Searching in headings is implemented in Sphinx 1.2 (soon to be released).  
We'll switch to that version at least for 3.3 and 3.4 when it's out, so you 
will get the result for the heading there.

The PyOS_snprintf will still be the first result, since results in "object 
names" are always the first preference.  But the second preference will be 
heading names.

--

___
Python tracker 

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



[issue18997] Crash when using pickle and ElementTree

2013-09-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 111a74819192 by doko in branch '3.3':
- followup for issue #18997, make _clear_joined_ptr static.
http://hg.python.org/cpython/rev/111a74819192

New changeset 269be4aacb8e by doko in branch 'default':
- followup for issue #18997, make _clear_joined_ptr static.
http://hg.python.org/cpython/rev/269be4aacb8e

--

___
Python tracker 

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



[issue4366] cannot find -lpythonX.X when building Python on FreeBSD with --enable-shared

2013-09-18 Thread koobs

koobs added the comment:

Confirming identical failures on all branches:

tip: /usr/bin/ld: cannot find -lpython3.4m
3.3: /usr/bin/ld: cannot find -lpython3.3m
3.2: /usr/bin/ld: cannot find -lpython3.2m
3.1: /usr/bin/ld: cannot find -lpython3.1
2.7: /usr/bin/ld: cannot find -lpython2.7
2.6: /usr/bin/ld: cannot find -lpython2.6

Tested attached patch with success, will carry this patch locally in all 
FreeBSD Python ports until it merged. Let's close this 5 year old nasty :)

--
assignee:  -> eric.araujo
components: +Distutils
nosy: +eric.araujo, koobs, tarek
title: cannot find -lpythonX.X when buinding Python on FreeBSD -> cannot find 
-lpythonX.X when building Python on FreeBSD with --enable-shared
versions: +Python 2.6, Python 3.3, Python 3.4

___
Python tracker 

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



[issue19038] Fix sort order in Misc/ACKS.

2013-09-18 Thread Dmi Baranov

Dmi Baranov added the comment:

Guys, don't talk with bot - here is a summary [1] and his "history of glory" 
with patches to contributors lists [2]. Better way is cut-off this email from 
python.org services.

[1] http://wiki.gbatemp.net/wiki/User:TaeWong
[2] https://www.google.com/search?q=seotaewon...@gmail.com

--
nosy: +dmi.baranov
status: pending -> open

___
Python tracker 

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



[issue14984] netrc module allows read of non-secured .netrc file

2013-09-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6396d1fc72da by R David Murray in branch '3.1':
#14984: On POSIX, enforce permissions when reading default .netrc.
http://hg.python.org/cpython/rev/6396d1fc72da

New changeset 0d9e471221da by R David Murray in branch '3.2':
Merge #14984: On POSIX, enforce permissions when reading default .netrc.
http://hg.python.org/cpython/rev/0d9e471221da

New changeset b657196b9fc2 by R David Murray in branch '3.3':
Merge #14984: On POSIX, enforce permissions when reading default .netrc.
http://hg.python.org/cpython/rev/b657196b9fc2

New changeset bfc86caf98ae by R David Murray in branch 'default':
Merge #14984: On POSIX, enforce permissions when reading default .netrc.
http://hg.python.org/cpython/rev/bfc86caf98ae

--

___
Python tracker 

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



[issue14984] netrc module allows read of non-secured .netrc file

2013-09-18 Thread R. David Murray

R. David Murray added the comment:

Thanks, Benjamin.  And Thank you, Bruno.

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

___
Python tracker 

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



[issue4366] cannot find -lpythonX.X when building Python on FreeBSD with --enable-shared

2013-09-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Why special-case FreeBSD in the patch? Shouldn't this be done for nearly all 
Unix systems? (or, at the very least or BSD-likes)?

--
components: +Library (Lib)
nosy: +pitrou
stage:  -> patch review
versions:  -Python 2.6, Python 3.1, Python 3.2

___
Python tracker 

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



[issue19037] mailbox module modifies maildir file times after moving from tmp directory

2013-09-18 Thread R. David Murray

R. David Murray added the comment:

Janzert: Thanks for the patch.  A contributor agreement is not needed for this 
patch, since it just moves code around, but you might want to submit one in 
case you make any other contributions.  Also let us know what name to use in 
the Misc/ACKS file.

--

___
Python tracker 

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



[issue19037] mailbox module modifies maildir file times after moving from tmp directory

2013-09-18 Thread R. David Murray

Changes by R. David Murray :


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

___
Python tracker 

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



[issue19037] mailbox module modifies maildir file times after moving from tmp directory

2013-09-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 68e5e416e8af by R David Murray in branch '3.3':
#19037: adjust file times *before* moving maildir files into place.
http://hg.python.org/cpython/rev/68e5e416e8af

New changeset 041caa64486b by R David Murray in branch '2.7':
#19037: adjust file times *before* moving maildir files into place.
http://hg.python.org/cpython/rev/041caa64486b

New changeset 261910257af6 by R David Murray in branch 'default':
Merge #19037: adjust file times *before* moving maildir files into place.
http://hg.python.org/cpython/rev/261910257af6

--
nosy: +python-dev

___
Python tracker 

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



[issue4366] cannot find -lpythonX.X when building Python on FreeBSD with --enable-shared

2013-09-18 Thread koobs

koobs added the comment:

Concur, and then also, why special case linux, gnu and sunos?

The comment is:

# Python's library directory [[must]] be appended to library_dirs (emphasis 
mine)

Is the real question then "in what cases should the library path NOT be added?" 
?

I also note Christian used a different approach (#msg76118), electing to 
unconditionally add the path in setup.py

--

___
Python tracker 

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



[issue14984] netrc module allows read of non-secured .netrc file

2013-09-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fb3ad8a749c8 by R David Murray in branch '2.6':
#14984: only import pwd on POSIX.
http://hg.python.org/cpython/rev/fb3ad8a749c8

New changeset 88e62c43e443 by R David Murray in branch '2.7':
Merge #14984: only import pwd on POSIX.
http://hg.python.org/cpython/rev/88e62c43e443

New changeset 713d71048ab9 by R David Murray in branch '3.1':
#14984: only import pwd on POSIX.
http://hg.python.org/cpython/rev/713d71048ab9

New changeset ef90c40fe6cf by R David Murray in branch '3.2':
Merge #14984: only import pwd on POSIX.
http://hg.python.org/cpython/rev/ef90c40fe6cf

New changeset b8206cb2c4ee by R David Murray in branch '3.3':
Merge #14984: only import pwd on POSIX.
http://hg.python.org/cpython/rev/b8206cb2c4ee

New changeset ad9a5ded5cf6 by R David Murray in branch 'default':
Merge #14984: only import pwd on POSIX.
http://hg.python.org/cpython/rev/ad9a5ded5cf6

--

___
Python tracker 

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



[issue19038] Fix sort order in Misc/ACKS.

2013-09-18 Thread Tae-Wong SEO

Tae-Wong SEO added the comment:

The first link is a GBAtemp page.
The second link is a search.
You want to apply this patch.

--

___
Python tracker 

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



[issue16129] No good way to set 'PYTHONIOENCODING' when embedding python.

2013-09-18 Thread Bastien Montagne

Bastien Montagne added the comment:

Hi,

Decided to give it a try and implement suggested Py_SetStandardStreamEncoding, 
see attached patch.

A quick test with Blender under Linux (with an ASCII console) seems to work OK, 
unfortunatly I do not have Windows to test it where it really matters...

That's my first piece of code ever written for Python, I hope it does not 
contain too much obvious errors!

--
nosy: +mont29
Added file: http://bugs.python.org/file31808/setstdio.diff

___
Python tracker 

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



[issue19038] Fix sort order in Misc/ACKS.

2013-09-18 Thread Tae-Wong SEO

Tae-Wong SEO added the comment:

Let's restore status and resolution without rejecting.

You want to apply this.

--
resolution: rejected -> 
status: closed -> open

___
Python tracker 

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



[issue19038] Fix sort order in Misc/ACKS.

2013-09-18 Thread Georg Brandl

Georg Brandl added the comment:

Let's try a plain rejection first.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue19038] Fix sort order in Misc/ACKS.

2013-09-18 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue19037] mailbox module modifies maildir file times after moving from tmp directory

2013-09-18 Thread janzert

janzert added the comment:

Thanks for committing the fix.

Figured I should finally get it done and signed the online CLA when I submitted 
this issue. I assume it just takes a while for someone to go through and apply 
the appropriate flag?

This change seems rather insubstantial for an ACKS line so I certainly don't 
mind waiting. Since a certain Birkenfeld became Brandl I know names are a bit 
sensitive for some python core devs. So while my personal preference would go 
to Janzert* the one that fits Python custom is Brian Haskin.

* Janzert is the most widely used and distinct identifier for my open source 
and online activity.

--

___
Python tracker 

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



[issue18918] help('FILES') finds no documentation

2013-09-18 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Hello. The 'File objects' section was removed in Python 3, with this issue 
http://bugs.python.org/issue7508, but not the topic from pydoc.py. As I 
understand, there is no point in having this, because there isn't a `file` type 
anymore.
The attached patched removes the `FILES` topic, which used an undefined 
reference ('bltin-file-objects', removed in the mentioned issue).

--
keywords: +patch
nosy: +Claudiu.Popa
Added file: http://bugs.python.org/file31809/pydoc_files.patch

___
Python tracker 

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



[issue19019] Investigate using Apple clang for building OS X installers

2013-09-18 Thread Skip Montanaro

Skip Montanaro added the comment:

If you find it difficult to find people with 10.6 systems to build a Python dmg 
for that platform, give me a shout. I'm not planning on replacing my system 
anytime soon. I have 10.6.8 installed, and what I believe to be the last Xcode 
version to support it, 3.2.something.

--
nosy: +skip.montanaro

___
Python tracker 

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



[issue19019] Investigate using Apple clang for building OS X installers

2013-09-18 Thread Ned Deily

Ned Deily added the comment:

Thanks, Skip. At the moment, finding platforms for building and testing is not 
a problem: I have at hand running versions of the latest releases for 10.3 
onwards. :)  (Buildbots for automated testing are another issue, though. We 
have a critical need for buildbots running more recent versions of OS X, 
though.  At the moment, the only OS X buildbot is one running 10.4 (Tiger).  If 
anyone is able to provide newer ones, please see 
http://python.org/dev/buildbot/.  Or, if someone would like to donate hardware, 
I may be able to arrange hosting for it.)

--

___
Python tracker 

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



[issue19019] Investigate using Apple clang for building OS X installers

2013-09-18 Thread Skip Montanaro

Skip Montanaro added the comment:

I guess snakebite (http://www.snakebite.net/) never materialized?

--

___
Python tracker 

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



[issue19019] Investigate using Apple clang for building OS X installers

2013-09-18 Thread Ned Deily

Ned Deily added the comment:

Snakebite did provide some additional OS X buildbots for a while but, AFAIK, 
they have been offline for some months now.

--

___
Python tracker 

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



[issue19019] Investigate using Apple clang for building OS X installers

2013-09-18 Thread R. David Murray

R. David Murray added the comment:

Snakebite is live, and python committers can get shell access on the bots, as 
originally planned.  Some of the bots are offline, but most are running.  I 
don't see any OS X servers in the list, though, unless Antoine deleted them 
(but there are several other currently-offline ones he hasn't deleted, so I 
doubt that).

--
nosy: +r.david.murray

___
Python tracker 

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



[issue18790] incorrect text in argparse add_help example

2013-09-18 Thread Berker Peksag

Berker Peksag added the comment:

This was reported a couple of times before on the docs list.

- https://mail.python.org/pipermail/docs/2013-April/015145.html
- https://mail.python.org/pipermail/docs/2013-June/015016.html
- https://mail.python.org/pipermail/docs/2013-September/015505.html

--
nosy: +berker.peksag, ezio.melotti
stage:  -> patch review
versions: +Python 3.4

___
Python tracker 

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



[issue16512] imghdr doesn't support jpegs with an ICC profile

2013-09-18 Thread intgr

intgr added the comment:

I vote we forget about JFIF/Exif headers and only use \xff\xd8 to identify the 
file. They are optional and there are tons of files out in the wild without 
such headers, for example: 
https://coverartarchive.org/release/5044b557-a9ed-4a74-b763-e20580ced85d/3354872309.jpg

Proposed patch at 
https://bitbucket.org/intgr/cpython/commits/012cde305316e22a999d674a0a009200d3e76fdb

--
hgrepos: +210
nosy: +intgr

___
Python tracker 

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



[issue16878] argparse: positional args with nargs='*' defaults to []

2013-09-18 Thread paul j3

paul j3 added the comment:

On a related point, the 'action.required' value is set differently for '?' and 
'*' positionals.  

if kwargs.get('nargs') not in [OPTIONAL, ZERO_OR_MORE]:
kwargs['required'] = True
if kwargs.get('nargs') == ZERO_OR_MORE and 'default' not in kwargs:
kwargs['required'] = True

OPTIONAL is always not required, ZERO_OR_MORE is not required if it has a 
default.  But for reasons discussed here, that 'required' value makes little 
difference.  

`parse_args` checks that all 'required' arguments have been seen, but a 
ZERO_OR_MORE positional is always seen (i.e. it matches an empty string).  

Usage formatting always uses '[%s [%s ...]]' with ZERO_OR_MORE, regardless of 
the 'required' attribute.

The only place where this 'required' value seems to matter is when adding such 
an argument to a mutually exclusive group.  But if an unused '*' positional is 
going to get a '[]' value anyways, why should it be excluded from such a use?

If I remove the 

if kwargs.get('nargs') == ZERO_OR_MORE and 'default' not in kwargs:

test, test_argparse.py still runs fine.

http://bugs.python.org/issue18943 is a possibly related issue, involving  a 'is 
not action.default' test in a mutually exclusive group.

--

___
Python tracker 

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



[issue19043] Remove detailed listing of all versions from LICENSE, Doc/license.rst

2013-09-18 Thread Georg Brandl

New submission from Georg Brandl:

As discussed on python-dev.

--
assignee: docs@python
components: Documentation
files: license_fixup_33.patch
keywords: patch
messages: 198036
nosy: docs@python, georg.brandl
priority: normal
severity: normal
status: open
title: Remove detailed listing of all versions from LICENSE, Doc/license.rst
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31810/license_fixup_33.patch

___
Python tracker 

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



[issue19043] Remove detailed listing of all versions from LICENSE, Doc/license.rst

2013-09-18 Thread Georg Brandl

Changes by Georg Brandl :


Added file: http://bugs.python.org/file31811/license_fixup_27.patch

___
Python tracker 

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



[issue4366] cannot find -lpythonX.X when building Python on FreeBSD with --enable-shared

2013-09-18 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-18 Thread Ethan Furman

Ethan Furman added the comment:

Okay, some slight reorganizing.  Current patch gives preferential treatment to 
getattr, falling back on dict lookup if getattr raises an exception or if the 
resulting object's class is not found in the mro (including the metaclass mro).

Amazingly, nothing appeared to break in the test suite.  :)

If no kibitzing in the next couple days I'll write some tests to better 
excercise the metaclass portion (I used Enum for interactive testing).

--
Added file: http://bugs.python.org/file31812/issue19030.stoneleaf.03.patch

___
Python tracker 

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



[issue19043] Remove detailed listing of all versions from LICENSE, Doc/license.rst

2013-09-18 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue11708] argparse: suggestion for formatting optional positional args

2013-09-18 Thread paul j3

paul j3 added the comment:

This is a HelpFormatter function that takes a list of formatted actions, and 
groups contiguous blocks of optional positional actions.  It accounts for 
optionals (via prefix_chars) and mutually exclusive groups.

Since it assumes 'parts' is a list, rather than string, it works best with the 
'_format_actions_usage' method in the patch that I submitted to 
http://bugs.python.org/issue11874 

def _positionals_regroup(self, parts):
# change '[arg1] [arg2]' to '[arg1 [arg2]]'
# apply to a list of formatted arguments
# don't apply to optionals (with prefix chars) or groups
chars = getattr(self, 'prefix_chars',set('-'))
R = _re.compile(r'\] \[(.*)\]')
result = []
text = None
while  parts:
part = parts.pop()
if part:
if part[0]=='[' and part[1] not in chars and '|' not in part:
if text:
text = ' '.join([part, text])
else:
text = part
if R.search(text):
text = R.sub(' [\g<1>]]',text)
else:
if text:
result.insert(0,text)
text = None
result.insert(0,part)
if text:
result.insert(0,text)
return result

To avoid compatibility issues it could implemented in a subclassed 
HelpFormatter.

--

___
Python tracker 

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



[issue19043] Remove detailed listing of all versions from LICENSE, Doc/license.rst

2013-09-18 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue19044] getaddrinfo raises near-useless exception

2013-09-18 Thread Nikolaus Rath

New submission from Nikolaus Rath:

I received a bugreport for a Python application that contains the following 
stacktrace:

>   File "/usr/lib/python3.3/http/client.py", line 1057, in endheaders
> self._send_output(message_body)
>   File "/usr/lib/python3.3/http/client.py", line 902, in _send_output
> self.send(msg)
>   File "/usr/lib/python3.3/http/client.py", line 840, in send
> self.connect()
>   File "/usr/lib/python3.3/http/client.py", line 1194, in connect
> self.timeout, self.source_address)
>   File "/usr/lib/python3.3/socket.py", line 417, in create_connection
> for res in getaddrinfo(host, port, 0, SOCK_STREAM):
> OSError: [Errno 0] Error

My guess is that something went wrong with the name resolution, but it seems 
near impossible to handle this in the application because apparently the 
exception contains no machine usable useful informaton at all. 


It would be nice if whatever information Python used to determine that the 
getaddrinfo call failed could be included in the exception, so that it can be 
properly caught and handled.

--
components: Library (Lib)
messages: 198039
nosy: Nikratio
priority: normal
severity: normal
status: open
title: getaddrinfo raises near-useless exception
type: behavior
versions: Python 3.3

___
Python tracker 

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



[issue19044] getaddrinfo raises near-useless exception

2013-09-18 Thread Ned Deily

Ned Deily added the comment:

This looks like a platform bug. What platform was this running on?  A web 
search turns up other reports of the system getaddrinfo() returning errno = 0 
due to a glibc bug, for example, 
https://bugzilla.redhat.com/show_bug.cgi?id=958652.

--
nosy: +ned.deily

___
Python tracker 

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



[issue18553] os.isatty() is not Unix only

2013-09-18 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Georg: Thanks for spotting. I feel bad for the mistake. I shall correct it.

--

___
Python tracker 

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



[issue19044] getaddrinfo raises near-useless exception

2013-09-18 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +neologix

___
Python tracker 

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