Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-63143: Fix parsing mutually exclusive arguments in argparse#124307

Merged
serhiy-storchaka merged 2 commits into
python:mainpython/cpython:mainfrom
serhiy-storchaka:argparse-exclusive-defaultserhiy-storchaka/cpython:argparse-exclusive-defaultCopy head branch name to clipboard
Sep 24, 2024
Merged

gh-63143: Fix parsing mutually exclusive arguments in argparse#124307
serhiy-storchaka merged 2 commits into
python:mainpython/cpython:mainfrom
serhiy-storchaka:argparse-exclusive-defaultserhiy-storchaka/cpython:argparse-exclusive-defaultCopy head branch name to clipboard

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 21, 2024

Copy link
Copy Markdown
Member

Arguments with the value identical to the default value (e.g. booleans, small integers, empty or 1-character strings) are no longer considered "not present".

Arguments with the value identical to the default value (e.g. booleans,
small integers, empty or 1-character strings) are no longer considered
"not present".
@rruuaanng

Copy link
Copy Markdown
Contributor

It seems that this issue is very similar to issue #109990 (that issue is to ignore existing optional parameters), but its PR has not been reviewed for a long time.

@serhiy-storchaka

Copy link
Copy Markdown
Member Author

I do not think that these issues are similar. #109990 is rather similar to #59317, in sense that both can only be solved by drastic rewriting of the algorithm. I will look if the proposed PR provides at least partial solution.

@serhiy-storchaka serhiy-storchaka merged commit 3094cd1 into python:main Sep 24, 2024
@miss-islington-app

Copy link
Copy Markdown

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-exclusive-default branch September 24, 2024 07:23
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 24, 2024
…ythonGH-124307)

Arguments with the value identical to the default value (e.g. booleans,
small integers, empty or 1-character strings) are no longer considered
"not present".
(cherry picked from commit 3094cd1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app

bedevere-app Bot commented Sep 24, 2024

Copy link
Copy Markdown

GH-124418 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 24, 2024
…ythonGH-124307)

Arguments with the value identical to the default value (e.g. booleans,
small integers, empty or 1-character strings) are no longer considered
"not present".
(cherry picked from commit 3094cd1)

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 24, 2024
@bedevere-app

bedevere-app Bot commented Sep 24, 2024

Copy link
Copy Markdown

GH-124419 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 24, 2024
serhiy-storchaka added a commit that referenced this pull request Sep 24, 2024
…GH-124307) (GH-124419)

Arguments with the value identical to the default value (e.g. booleans,
small integers, empty or 1-character strings) are no longer considered
"not present".
(cherry picked from commit 3094cd1)

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

Arguments with the value identical to the default value (e.g. booleans,
small integers, empty or 1-character strings) are no longer considered
"not present".
(cherry picked from commit 3094cd1)

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.