Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Barry Warsaw
On Sep 11, 2012, at 05:30 PM, Terry Reedy wrote: >> And yet, that's how it works in 2.7, 3.2, and 3.3.1. > >In all 2.7 or 3.2? It will be broken in 2.7.4 and 3.2.4, but the Ubuntu packages in 12.10 are currently affected because they pulled in some Mercurial updates which included these unrelease

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Terry Reedy
On 9/11/2012 3:31 PM, Barry Warsaw wrote: On Sep 11, 2012, at 01:17 PM, Terry Reedy wrote: As I see it, storing is done *with* a default or explicit value, appending is done *to* a start value *with* whatever. Perhaps reusing 'default' instead of using a new name such as 'start' was a bit too

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Barry Warsaw
On Sep 11, 2012, at 10:13 PM, Georg Brandl wrote: >> Traceback (most recent call last): >> File "/home/barry/projects/python/3.3.0/Parser/asdl.py", line 309, in visit >> meth(object, *args) >> File "./Parser/asdl_c.py", line 1043, in visitSum >> self.simpleSum(sum, name) >> File "./P

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Georg Brandl
On 11.09.2012 21:25, Barry Warsaw wrote: > On Sep 11, 2012, at 03:08 PM, Barry Warsaw wrote: > >>Are you sure about that? >> >>% ./python >>Python 3.3.0rc2+ (default:6fea947edead, Sep 11 2012, 15:03:16) > > Never mind. Georg didn't pull that patch into his release clone. > > (Aside: Georg, may

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Barry Warsaw
On Sep 11, 2012, at 12:19 PM, R. David Murray wrote: >There is another possible semantic, which is that when the store type is >append, the converter should be applied to each of the individual items in >the default list. Yep. Maybe for 3.4 . >Which brings us to another issue: as things stand n

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Barry Warsaw
On Sep 11, 2012, at 10:39 AM, Chris Jerdonek wrote: >So another way out could simply be not to call type on non-strings. >Indeed, this was done before. One of the changes that was made in the >patch for issue 12776 was to remove the str type check prior to >calling type. Yep, so probably that's

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Barry Warsaw
On Sep 11, 2012, at 01:17 PM, Terry Reedy wrote: >This second example strikes me (naively, as English speaker but not argparse >user) as 'wrong' in that 'default' is being misused to mean 'start value that >is always used to generate the final value' [as in sum(iterable, start=0)], >rather than 'f

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Barry Warsaw
On Sep 11, 2012, at 03:08 PM, Barry Warsaw wrote: >Are you sure about that? > >% ./python >Python 3.3.0rc2+ (default:6fea947edead, Sep 11 2012, 15:03:16) Never mind. Georg didn't pull that patch into his release clone. (Aside: Georg, maybe you could fiddle with the default branch's version num

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread R. David Murray
On Tue, 11 Sep 2012 15:08:26 -0400, Barry Warsaw wrote: > On Sep 11, 2012, at 12:19 PM, R. David Murray wrote: > > >The 12776 fix isn't going to be in 3.3, so I don't think this is a > >pressing issue. We can take our time to make sure we have the correct > >fix. It is, however, a release block

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Barry Warsaw
On Sep 11, 2012, at 12:19 PM, R. David Murray wrote: >The 12776 fix isn't going to be in 3.3, so I don't think this is a >pressing issue. We can take our time to make sure we have the correct >fix. It is, however, a release blocker for 2.7.4, 3.2.4, and 3.3.1. Are you sure about that? % ./pyth

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Chris Jerdonek
On Tue, Sep 11, 2012 at 10:17 AM, Terry Reedy wrote: > On 9/11/2012 11:34 AM, Barry Warsaw wrote: >> It seems to me that the semantics could reasonably be implied to mean that >> the >> type converter should only be applied to the default value when >> action='store', as is the default. Then in t

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Terry Reedy
On 9/11/2012 11:34 AM, Barry Warsaw wrote: Issue 15906 describes a problem with argparse that is breaking lots of code in Ubuntu. This is a recent regression caused by the fix for issue 12776, and it affects Python 2.7, 3.2, and 3.3. I posted a diff that should fix the problem, but at the heart

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread R. David Murray
On Tue, 11 Sep 2012 11:34:30 -0400, Barry Warsaw wrote: > Issue 15906 describes a problem with argparse that is breaking lots of code in > Ubuntu. This is a recent regression caused by the fix for issue 12776, and it > affects Python 2.7, 3.2, and 3.3. > > I posted a diff that should fix the pro

[Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Barry Warsaw
Issue 15906 describes a problem with argparse that is breaking lots of code in Ubuntu. This is a recent regression caused by the fix for issue 12776, and it affects Python 2.7, 3.2, and 3.3. I posted a diff that should fix the problem, but at the heart of it is a semantic ambiguity in argparse th