8000 gh-133548: fix handling of empty and 1-item tuples for `sys.exit` by picnixz · Pull Request #135789 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-133548: fix handling of empty and 1-item tuples for sys.exit #135789

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add What's New entry
  • Loading branch information
picnixz committed Jun 24, 2025
commit 171985651202bc7b4fad2d97ccab49cd4a7525eb
5 changes: 5 additions & 0 deletions Doc/whatsnew/3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ Other language changes
* Several error messages incorrectly using the term "argument" have been corrected.
(Contributed by Stan Ulbrych in :gh:`133382`.)

* :func:`sys.exit` and :exc:`SystemExit` now correctly handle empty and 1-item
tuples arguments. Previously, such tuples were unpacked by :func:`!sys.exit`
but not by :exc:`!SystemExit` and the process status code was incorrectly
set.
(Contributed by Bénédikt Tran in :gh:`133548`.)


New modules
Expand Down
0