8000 gh-104860: Fix allow_abbrev=False for single-dash long options by serhiy-storchaka · Pull Request #124340 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-104860: Fix allow_abbrev=False for single-dash long options #124340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

serhiy-storchaka
Copy link
Member
@serhiy-storchaka serhiy-storchaka commented Sep 23, 2024

Copy link
Member
@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change LGTM but I didn't approve the PR since I don't know well argparse code base. The test covers the changed code.

I'm not sure if we should backport the change since it changes the behavior which is there since Python 3.8. Even if it's a bug, users may rely on the current behavior.

@serhiy-storchaka
Copy link
Member Author
serhiy-storchaka commented Sep 26, 2024

I think this is pretty safe change. It makes the code working as it is supposed to work, as it is documented, and as it worked it the past. If you do not want to disallow abbreviation, just do not use allow_abbrev=False.

@serhiy-storchaka serhiy-storchaka merged commit 49e105f into python:main Sep 29, 2024
37 checks passed
@miss-islington-app
Copy link

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the argparse-disallow-single-dash-long-abbrev branch September 29, 2024 07:44
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 29, 2024
…ythonGH-124340)

(cherry picked from commit 49e105f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link
bedevere-app bot commented Sep 29, 2024

GH-124749 is a backport of this pull request to the 3.13 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 29, 2024
…ythonGH-124340)

(cherry picked from commit 49e105f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Sep 29, 2024
@bedevere-app
Copy link
bedevere-app bot commented Sep 29, 2024

GH-124750 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Sep 29, 2024
serhiy-storchaka added a commit that referenced this pull request Sep 29, 2024
…GH-124340) (GH-124750)

(cherry picked from commit 49e105f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Oct 7, 2024
…GH-124340) (GH-124749)

(cherry picked from commit 49e105f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0