Skip to content
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

Add deprecation warning to python versions <3.6 in x.py #112483

Merged
merged 1 commit into from
Jun 10, 2023

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jun 10, 2023

Introduced based on conversation on Zulip. This is a repeat of #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 #110439) and @Mark-Simulacrum (reviewer of that PR)

Soft deprecate old python versions to give users a warning that
eventually it may not be supported.
@rustbot
Copy link
Collaborator

rustbot commented Jun 10, 2023

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jun 10, 2023
@tgross35
Copy link
Contributor Author

We could also create a dedicated issue for python version issues and link that in the error message.

@Mark-Simulacrum
Copy link
Member

I'm OK with this, and not sure that the env variable is entirely useful, but seems fine to keep it.

We can revisit this if there are concerns or we encounter too many warnings in practice.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 10, 2023

📌 Commit cec95d7 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 10, 2023
@tgross35
Copy link
Contributor Author

I'm OK with this, and not sure that the env variable is entirely useful, but seems fine to keep it.

I think I may have misunderstood your comment #110439 (comment) since you can disable warning.warn() warnings. But agreed it's probably fine to have an explicit option

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 10, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#112297 (bootstrap: Disallow `--exclude test::std`)
 - rust-lang#112298 (Update field-offset and enable unstable_offset_of)
 - rust-lang#112335 (ci: Upgrade loongarch64-linux-gnu GCC to 13.1.0)
 - rust-lang#112413 (Adjust span labels for `HIDDEN_GLOB_REEXPORTS`)
 - rust-lang#112483 (Add deprecation warning to python versions <3.6 in x.py)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 68e162d into rust-lang:master Jun 10, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 10, 2023
@tgross35 tgross35 deleted the py2-dep-warning branch June 10, 2023 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants