[issue16308] Undocumented (?) behaviour change in argparse from 3.2.3 to 3.3.0

R. David Murray report at bugs.python.org
Thu Apr 18 16:36:59 CEST 2013


R. David Murray added the comment:

Yes, just with limited amounts of attention to spare :(

This is a rather difficult situation, since it appears we inadvertently changed a behavior.  Fortunately it was in a feature release.  Unfortunately a new parameter to make a subparser required again can't be done in a bug fix release.

There seem to be two ways to handle this:

(1) accept the new feature.  Then the bug fix should be to make the traceback not happen, and we should update the docs to mention the new behavior as added in 3.3.  Then we change issue 9253 to be about adding the required to subparsers in 3.4 with a default of False.

(2) treat this as a bug.  In that case the bug fix would be to restore the old required=True behavior, and making them optional again is an enhancement for 3.4 covered by issue 9253 as is.

The issue with (1) is that the discussion in #9253 concluded that the previous default behavior was "safer" for users.

In either case, we need a unit test that tests the behavior.

I think we need input either from Steven or from other Python core devs on which way to go, because I can't make up my mind :)  A post to python-dev may be in order, since we haven't heard anything from Steven for a while now.

----------
versions: +Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16308>
_______________________________________


More information about the Python-bugs-list mailing list