Skip to content

Conversation

@ZeroIntensity
Copy link
Member

@ZeroIntensity ZeroIntensity commented Feb 9, 2025

@ZeroIntensity ZeroIntensity added the topic-repl Related to the interactive shell label Feb 9, 2025
@ZeroIntensity ZeroIntensity added the needs backport to 3.13 bugs and security fixes label Feb 9, 2025
chrisbra added a commit to vim/vim that referenced this pull request Feb 9, 2025
…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 <[email protected]>
@ZeroIntensity ZeroIntensity requested a review from vstinner March 25, 2025 13:12
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.

LGTM

Modules/main.c Outdated
}
int run = pymain_run_module(L"_pyrepl", 0);
return (run != 0);
return run;
Copy link
Member

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);.

@vstinner vstinner enabled auto-merge (squash) March 25, 2025 13:39
@ZeroIntensity
Copy link
Member Author

The CIFuzz job is acting up, I've rebased to see if that fixes it.

@vstinner vstinner merged commit 90b82f2 into python:main Mar 25, 2025
42 checks passed
@miss-islington-app
Copy link

Thanks @ZeroIntensity for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 25, 2025
…ed from the command line (pythonGH-129901)

(cherry picked from commit 90b82f2)

Co-authored-by: Peter Bierma <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Mar 25, 2025

GH-131734 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 Mar 25, 2025
@ZeroIntensity ZeroIntensity deleted the fix-repl-exit branch March 25, 2025 19:50
@vstinner
Copy link
Member

Merged, thanks for the fix. The backport will be merged soon.

vstinner pushed a commit that referenced this pull request Mar 25, 2025
…ted from the command line (GH-129901) (#131734)

gh-129900: Fix `SystemExit` return codes when the REPL is started from the command line (GH-129901)
(cherry picked from commit 90b82f2)

Co-authored-by: Peter Bierma <[email protected]>
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 1, 2025
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-repl Related to the interactive shell

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants