Author zzzeek
Recipients DasIch, G2P, Julian, bethard, bewest, bkabrda, chris.jerdonek, csernazs, dsully, elsdoerfer, eric.araujo, labrat, nvie, r.david.murray, zzzeek
Date 2013-02-10.21:09:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1360530588.59.0.528035165571.issue9253@psf.upfronthosting.co.za>
In-reply-to
Content
um, this seems like a regression/bug?   I now have users complaining that my apps are broken because of this change as of Python 3.3.    My application is supposed to return the "help" screen when no command is given.  Now I get a None error because argparse is not trapping this condition:

from argparse import ArgumentParser
parser = ArgumentParser(prog='test')
subparsers = parser.add_subparsers()
subparser = subparsers.add_parser("foo", help="run foo")
parser.parse_args()

$ python3.2 test.py
usage: test [-h] {foo} ...
test: error: too few arguments

$ python3.3 test.py
$

This seems very much like a major feature has been yanked away from argparse, now I have to check for this condition explicitly.

am I on the right issue here or do I need to open something new ?
History
Date User Action Args
2013-02-10 21:09:48zzzeeksetrecipients: + zzzeek, csernazs, bethard, eric.araujo, r.david.murray, labrat, chris.jerdonek, nvie, DasIch, elsdoerfer, G2P, Julian, dsully, bewest, bkabrda
2013-02-10 21:09:48zzzeeksetmessageid: <1360530588.59.0.528035165571.issue9253@psf.upfronthosting.co.za>
2013-02-10 21:09:48zzzeeklinkissue9253 messages
2013-02-10 21:09:48zzzeekcreate