Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

gh-121018: Fix more cases of exiting in argparse when exit_on_error=False#121056

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedJun 26, 2024
edited by bedevere-appbot
Loading

  • parse_intermixed_args() now raises ArgumentError instead of calling error() if exit_on_error is false.
  • Internal code now always raises ArgumentError instead of calling error(). It is then caught at higher level and error() is called if exit_on_error is true.

lrq3000 reacted with hooray emoji
…rror=False* parse_intermixed_args() now raises ArgumentError instead of calling  error() if exit_on_error is false.* Internal code now always raises ArgumentError instead of calling  error(). It is then caught at higher level and error() is called if  exit_on_error is true.
@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-storchakaserhiy-storchaka deleted the argparse-exit_on_error branchJune 28, 2024 14:22
@miss-islington-app
Copy link

Sorry,@serhiy-storchaka, I could not cleanly backport this to3.13 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker 81a654a3425eaa05a51342509089533c1f623f1b 3.13

@miss-islington-app
Copy link

Sorry,@serhiy-storchaka, I could not cleanly backport this to3.12 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker 81a654a3425eaa05a51342509089533c1f623f1b 3.12

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull requestJun 28, 2024
…it_on_error=False (pythonGH-121056)* parse_intermixed_args() now raises ArgumentError instead of calling  error() if exit_on_error is false.* Internal code now always raises ArgumentError instead of calling  error(). It is then caught at the higher level and error() is called if  exit_on_error is true.(cherry picked from commit81a654a)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

GH-121128 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelJun 28, 2024
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull requestJun 28, 2024
…it_on_error=False (pythonGH-121056)* parse_intermixed_args() now raises ArgumentError instead of calling  error() if exit_on_error is false.* Internal code now always raises ArgumentError instead of calling  error(). It is then caught at the higher level and error() is called if  exit_on_error is true.(cherry picked from commit81a654a)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

GH-121129 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelJun 28, 2024
serhiy-storchaka added a commit that referenced this pull requestJun 28, 2024
…error=False (GH-121056) (GH-121129)* parse_intermixed_args() now raises ArgumentError instead of calling  error() if exit_on_error is false.* Internal code now always raises ArgumentError instead of calling  error(). It is then caught at the higher level and error() is called if  exit_on_error is true.(cherry picked from commit81a654a)
serhiy-storchaka added a commit that referenced this pull requestJun 28, 2024
…error=False (GH-121056) (GH-121128)* parse_intermixed_args() now raises ArgumentError instead of calling  error() if exit_on_error is false.* Internal code now always raises ArgumentError instead of calling  error(). It is then caught at the higher level and error() is called if  exit_on_error is true.(cherry picked from commit81a654a)
mrahtz pushed a commit to mrahtz/cpython that referenced this pull requestJun 30, 2024
…rror=False (pythonGH-121056)* parse_intermixed_args() now raises ArgumentError instead of calling  error() if exit_on_error is false.* Internal code now always raises ArgumentError instead of calling  error(). It is then caught at the higher level and error() is called if  exit_on_error is true.
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull requestJul 11, 2024
…rror=False (pythonGH-121056)* parse_intermixed_args() now raises ArgumentError instead of calling  error() if exit_on_error is false.* Internal code now always raises ArgumentError instead of calling  error(). It is then caught at the higher level and error() is called if  exit_on_error is true.
estyxx pushed a commit to estyxx/cpython that referenced this pull requestJul 17, 2024
…rror=False (pythonGH-121056)* parse_intermixed_args() now raises ArgumentError instead of calling  error() if exit_on_error is false.* Internal code now always raises ArgumentError instead of calling  error(). It is then caught at the higher level and error() is called if  exit_on_error is true.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp