Python 2.7b1 and argparse's version action

Tobias Herp bruno-der-fragwuerdige at
Sat Apr 17 22:44:44 EDT 2010

Am 18.04.2010 04:09, schrieb Chris Rebert:
> On Sat, Apr 17, 2010 at 6:53 PM, Tobias Herp
> <bruno-der-fragwuerdige at> wrote:
>> Hi, all,
>> I notice that Python 2.7 beta 1 now contains the argparse module, which
>> might be a good thing.  The code has been cleaned up, too.
>> But there is still one issue with argparse:
>> Completely unnecessarily, the 'version' constructor argument is now
>> deprecated.  This fact doesn't solve any problem I can think of; the
>> only effect is to make programming more cumbersome, and it is /one more/
>> difference to optparse.
> <snip>
>> *Before Python 2.7 getting a production release*, IMNSHO the following
>> changes should be applied to
>> - removal of the deprecation warnings
>> - removal of the default usage of '-v'
>>  with the version information facility
>> This is a very simple thing to do; I'd happily provide a patch.
>> Just for the records, this is what optparse does:
>> - it defines -h and --help for the help (unless suppressed)
>> - it defines --version for the version (if version argument given)
>> This is how it should be.
>> This is how the vast majority of *x tools looks like.
>>  (well, some use '-h' for something like "host" or "human readable";
>>  but just a few strange misfits use -v instead of -V for the version.)
>> No reason to change this behaviour.
>> What do you think?
> You'd probably ought to just complain upstream to the argparse project
> itself. The change doesn't seem to have been made specifically for std
> lib inclusion (though I didn't read the bug in depth).
> This looks like the relevant issue:

Yes, this is the issue I once submitted.  I had a very hard time
discussing, since Steven insisted (and apparently still insists) in -v
as a reasonable default short option for the version feature.

Then I had some password database problems, and during the time I fell
silent, he decided to deprecate the version argument.

Since the code has been cleaned up and differs in many details from the
current argparse v1.1, I hoped for somebody with a Python hat on to say,
"This module is nice, but to make it in a production release of Python
these simple issues must be fixed."

To plagiarise Galahad (Monty Python and the Holy Grail):
  "Is there someone else up there we could talk to?"


More information about the Python-list mailing list