-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
gh-129900: Fix SystemExit
return codes when the REPL is started from the command line
#129901
Conversation
ZeroIntensity
commented
Feb 9, 2025
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Issue: Exit code in case of an error is always 1 since Python 3.13 #129900
…ndows Problem: tests: fix expected return code for python 3.13 on Windows Solution: Check for return code 1 or 123 on Windows There is a regression with python 3.13 on Windows, that it no longer prints the requested error code, but instead exits with return code 1, which breaks the test-suite. So let's check for either exit code 1 or 123 in tests Test_terminal_duplicate_eof_arg() and Test_terminal_eof_arg() This will probably be fixed on the Python side, see the pull request python/cpython#129901 but in the meantime, let's allow both error codes. related: #16599 related: python/cpython#129900 Signed-off-by: Christian Brabandt <cb@256bit.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Modules/main.c
Outdated
@@ -563,7 +563,7 @@ pymain_run_stdin(PyConfig *config) | |||
return (run != 0); | |||
} | |||
int run = pymain_run_module(L"_pyrepl", 0); | |||
return (run != 0); | |||
return run; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just write return pymain_run_module(L"_pyrepl", 0);
.
The CIFuzz job is acting up, I've rebased to see if that fixes it. |
Thanks @ZeroIntensity for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…ed from the command line (pythonGH-129901) (cherry picked from commit 90b82f2) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
GH-131734 is a backport of this pull request to the 3.13 branch. |
Merged, thanks for the fix. The backport will be merged soon. |