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-72795: Make positional arguments with nargs='*' or REMAINDER non-required#124306

Merged
serhiy-storchaka merged 3 commits into
python:mainpython/cpython:mainfrom
serhiy-storchaka:argparse-required-zero-or-moreserhiy-storchaka/cpython:argparse-required-zero-or-moreCopy head branch name to clipboard
Sep 24, 2024
Merged

gh-72795: Make positional arguments with nargs='*' or REMAINDER non-required#124306
serhiy-storchaka merged 3 commits into
python:mainpython/cpython:mainfrom
serhiy-storchaka:argparse-required-zero-or-moreserhiy-storchaka/cpython:argparse-required-zero-or-moreCopy head branch name to clipboard

Conversation

@serhiy-storchaka

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

Copy link
Copy Markdown
Member

This allows to use positional argument with nargs='*' and without default in mutually exclusive group and improves error message about required arguments.

… non-required

This allows to use positional argument with nargs='*' and without default
in mutually exclusive group and improves error message about required
arguments.
@serhiy-storchaka

Copy link
Copy Markdown
Member Author

The part of this PR fixed also #63143, so I extracted it into separate PR #124307 (with adding tests). This PR should be merged after #124307.

@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) September 24, 2024 07:32
@serhiy-storchaka serhiy-storchaka merged commit 3c83f99 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.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 24, 2024
… non-required (pythonGH-124306)

This allows to use positional argument with nargs='*' and without default
in mutually exclusive group and improves error message about required
arguments.
(cherry picked from commit 3c83f99)

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

bedevere-app Bot commented Sep 24, 2024

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Sep 24, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 24, 2024
… non-required (pythonGH-124306)

This allows to use positional argument with nargs='*' and without default
in mutually exclusive group and improves error message about required
arguments.
(cherry picked from commit 3c83f99)

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

bedevere-app Bot commented Sep 24, 2024

Copy link
Copy Markdown

GH-124422 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 serhiy-storchaka deleted the argparse-required-zero-or-more branch September 24, 2024 08:43
serhiy-storchaka added a commit that referenced this pull request Sep 24, 2024
…R non-required (GH-124306) (GH-124422)

This allows to use positional argument with nargs='*' and without default
in mutually exclusive group and improves error message about required
arguments.
(cherry picked from commit 3c83f99)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Oct 7, 2024
…R non-required (GH-124306) (#124421)

This allows to use positional argument with nargs='*' and without default
in mutually exclusive group and improves error message about required
arguments.
(cherry picked from commit 3c83f99)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
jodal added a commit to mopidy/mopidy that referenced this pull request Oct 13, 2024
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.

1 participant

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