Title: allow_abbrev not working as intended in "argparse.ArgumentParser" in Python 3.9.0
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.9
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Rin, paul.j3, rhettinger
Priority: normal Keywords:

Created on 2020-10-21 09:44 by Rin, last changed 2020-10-21 15:31 by paul.j3. This issue is now closed.

File name Uploaded Description Edit Rin, 2020-10-21 09:44
Messages (2)
msg379202 - (view) Author: Ganesh Kumar (Rin) Date: 2020-10-21 09:44
the "allow_abbrev" in "argparse.ArgumentParser" behavior does not work as intended in python 3.9.0

$ python3 --version
Python 3.5.3
$ python3 -S
$ python3 -SS
usage: [-h] [-S] error: unrecognized arguments: -SS

$ python3.9 --version
Python 3.9.0
$ python3.9 -S
$ python3.9 -SS # no erros raised here

Have attached a sample file to check this
msg379213 - (view) Author: paul j3 (paul.j3) * (Python triager) Date: 2020-10-21 15:31
argparse : allow_abbrev behavior between 3.7 and 3.8

covers this issue well enough.  That latest change to `allow_abbrev` was prompted by:

argparse: allow_abbrev=False stops -vv from working

You also raised this issue on StackOverFlow.  That may be a better place to discuss this.
Date User Action Args
2020-10-21 15:31:15paul.j3setstatus: open -> closed

messages: + msg379213
stage: resolved
2020-10-21 12:10:36xtreaksetnosy: + rhettinger, paul.j3
2020-10-21 09:44:15Rincreate