From 99f6238b915c69bb1354550f65fc4ddadc3676a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=BChle?= Date: Fri, 13 Sep 2024 14:01:46 +0200 Subject: [PATCH] Update pytype to 2024.09.13 and Python 3.12 (#12653) --- .github/workflows/tests.yml | 4 ++-- requirements-tests.txt | 2 +- tests/README.md | 4 ++-- tests/pytype_test.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a1b0dc0ab..036d3c30e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,8 +41,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - # Max supported Python version as of pytype 2024.2.27. - python-version: "3.11" + # Max supported Python version as of pytype 2024.9.13. + python-version: "3.12" - name: Install uv run: curl -LsSf https://astral.sh/uv/install.sh | sh - run: uv pip install -r requirements-tests.txt --system diff --git a/requirements-tests.txt b/requirements-tests.txt index 83bf6451f..ab02f7c93 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -8,7 +8,7 @@ flake8-pyi==24.6.0 # must match .pre-commit-config.yaml mypy==1.11.1 pre-commit-hooks==4.6.0 # must match .pre-commit-config.yaml pyright==1.1.379 -pytype==2024.4.11; platform_system != "Windows" and python_version < "3.12" +pytype==2024.9.13; platform_system != "Windows" and python_version < "3.13" ruff==0.5.4 # must match .pre-commit-config.yaml # Libraries used by our various scripts. diff --git a/tests/README.md b/tests/README.md index 0e5cd9817..3be66f7f8 100644 --- a/tests/README.md +++ b/tests/README.md @@ -73,8 +73,8 @@ for this script. Note: this test cannot be run on Windows systems unless you are using Windows Subsystem for Linux. -It also requires a Python version < 3.11 as pytype does not yet support -Python 3.11 and above. +It also requires a Python version < 3.13 as pytype does not yet support +Python 3.13 and above. Run using: ```bash diff --git a/tests/pytype_test.py b/tests/pytype_test.py index 6f9e40d07..06c2f52a5 100755 --- a/tests/pytype_test.py +++ b/tests/pytype_test.py @@ -30,8 +30,8 @@ from _utils import SupportedVersionsDict, parse_stdlib_versions_file, supported_ if sys.platform == "win32": print("pytype does not support Windows.", file=sys.stderr) sys.exit(1) -if sys.version_info >= (3, 12): - print("pytype does not support Python 3.12+ yet.", file=sys.stderr) +if sys.version_info >= (3, 13): + print("pytype does not support Python 3.13+ yet.", file=sys.stderr) sys.exit(1) # pytype is not py.typed https://github.com/google/pytype/issues/1325