This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r1kk3r
Recipients r1kk3r
Date 2020-08-12.18:10:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1597255813.65.0.986302240119.issue41534@roundup.psfhosted.org>
In-reply-to
Content
I looked into changelog and the source code to see if the behavior was wanted but I was not able to see the source of the issue.

import argparse
parser = argparse.ArgumentParser(allow_abbrev=True)
parser.add_argument('-o', type=str, required=True, dest="bla", help="bla")
known_args, rest_of_args = parser.parse_known_args(["-o", "test1", "-object_lto", "test2"])
print(rest_of_args)

Executing with python 3.7.8

With allow_abbrev=True:

['test2']

allow_abbrev=False:

['-object_lto', 'test2']


Executed with python 3.8.5

With allow_abbrev=True:

['test2']

allow_abbrev=False:

['test2']


Is it expected? How do I get the behavior of python 3.7 in python 3.8?
History
Date User Action Args
2020-08-12 18:10:13r1kk3rsetrecipients: + r1kk3r
2020-08-12 18:10:13r1kk3rsetmessageid: <1597255813.65.0.986302240119.issue41534@roundup.psfhosted.org>
2020-08-12 18:10:13r1kk3rlinkissue41534 messages
2020-08-12 18:10:13r1kk3rcreate