Skip to content

Shows a user friendly message rather than simple pass #143485

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 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
4 changes: 2 additions & 2 deletions x.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
try:
os.execvp("python3", ["python3"] + sys.argv)
except OSError:
# Python 3 isn't available, fall back to python 2
pass
print("Python 3 is not available. Please install Python 3.6 or later.")
sys.exit(1)
Comment on lines +29 to +30
Copy link
Member

@fmease fmease Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this break Python 2 users (who don't have Python 3 installed on their system)? We intentionally keep supporting Python 2 past EOL because it doesn't cost us much maintenance-wise. The pass is quite intentional here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely you are right, but mentioning the print mostly refers to user get right kind of version which will eventually help them task done..


# soft deprecation of old python versions
skip_check = os.environ.get("RUST_IGNORE_OLD_PYTHON") == "1"
Expand Down
Loading