Skip to content

tidy: Update Python version requirements to 3.11 - #160896

Open
marcoieni wants to merge 1 commit into
rust-lang:mainfrom
marcoieni:tidy-python-3.11
Open

tidy: Update Python version requirements to 3.11#160896
marcoieni wants to merge 1 commit into
rust-lang:mainfrom
marcoieni:tidy-python-3.11

Conversation

@marcoieni

@marcoieni marcoieni commented Aug 11, 2026

Copy link
Copy Markdown
Member

Similar to #160429
I'm updating to 3.11 as requested in #160429 (comment) because 3.10 is EOL in 2 months.

@rustbot rustbot added A-tidy Area: The tidy tool S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 11, 2026
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.11

@marcoieni marcoieni Aug 11, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

To update this file I ran:

docker run --rm \
  -v "$PWD":/workspace \
  -w /workspace \
  python:3.11-slim \
  bash -c '
    python -m pip install --no-cache-dir \
      pip-tools==7.5.3 \
      &&
    pip-compile --generate-hashes --strip-extras \
      src/tools/tidy/config/requirements.in
  '

View changes since the review

Comment thread src/tools/tidy/src/extra_checks/mod.rs Outdated
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Aug 11, 2026
FROM ghcr.io/rust-lang/ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive
# Install python3.11 because python3 in ubuntu22 resolves to python3.10, which is EOL in October 2026.

@marcoieni marcoieni Aug 11, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I couldn't update to ubuntu 24 because python2.7 is not available there from apt.

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As discussed in #t-infra/bootstrap > Do we need to support Python 2?, we should just kick out the Python 2.7 package.

@marcoieni
marcoieni marked this pull request as ready for review August 11, 2026 08:38
@rustbot

rustbot commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

tidy extra checks were modified.

cc @lolbinarycat

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 11, 2026
@rustbot

rustbot commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789, jieyouxu

@jieyouxu jieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks. One non-blocking thought, r=me with or without.

View changes since this review

@@ -12,6 +13,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
python2.7 \

@jieyouxu jieyouxu Aug 12, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remark: hm, do we actually need python2.7? I guess we have something exercising bootstrap entry script still works with python 2.7? If we drop 2.7 support then we can bump to ubuntu 24?

@marcoieni marcoieni Aug 12, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If we drop 2.7 support then we can bump to ubuntu 24?

yes.

do we actually need python2.7? I guess we have something exercising bootstrap entry script still works with python 2.7?

The comment in the dockerfile says "intentionally uses python2 for x.py so we can test it still works."

I have no context if this comment is still valid or not :/

I would approve this PR like this and we can remove python2.7 support in another PR if we want 👍

EDIT: I saw the linked zulip topic now. I'll remove python2 support 👍

Comment thread src/tools/tidy/src/extra_checks/mod.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool 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) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants