-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Require Python 3 in bootstrap.py #110439
Require Python 3 in bootstrap.py #110439
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
If x.py was executed with Python 2, it tries to reexecute itself with Python 3 if that is available. If it isn't, we now raise an error. This may break people who have Python 3 in a nonstandard location under a nonstandard name. These people will now be forced to use `their-python3 x.py` instead of `./x.py`.
You can remove the |
I'm pretty sure I recently saw evidence of distributions that don't ship python 3 by default to this day, so I'm not sure this is the right step, particularly given that (as far as I know) python compatibility isn't costing us much, and we expect that in the relatively near term we'll be able to fully remove it. At minimum, I think I would feel better if we soft-deprecated: issue an error that can be ignored only when setting an environment variable or so, and don't actually remove support for several cycles. I think that would give plenty of opportunity for folks who'd be affected to speak up and help us understand timelines. Ultimately I tend to feel that we shouldn't bump minimums when it doesn't cost us much to maintain the existing ones, especially for rustc bootstrap. |
That's fair. It is a little annoying but probably nothing worth worrying about too much |
…imulacrum Add deprecation warning to python versions <3.6 in x.py Introduced based on conversation on Zulip. This is a repeat of rust-lang#110439 with two changes: - Warning rather than exit - Can be suppressed via an environment variable The min to not get the warning is set to 3.6 because that's a fairly recent "old" version (went EOL in 2021) and it's the first version to support useful modern features like f-strings and type hints. cc `@Nilstrieb` (author of rust-lang#110439) and `@Mark-Simulacrum` (reviewer of that PR)
If x.py was executed with Python 2, it tries to reexecute itself with Python 3 if that is available. If it isn't, we now raise an error.
This may break people who have Python 3 in a nonstandard location under a nonstandard name. These people will now be forced to use
their-python3 x.py
instead of./x.py
.#110427 (comment)