From 1e78d56f55cf1faabc57cf54ddf365d22a191b0b Mon Sep 17 00:00:00 2001 From: George Hickman Date: Sun, 27 Apr 2025 12:05:28 +0100 Subject: [PATCH 1/3] Upgrade Python to 3.11 --- .github/workflows/python-tests.yml | 2 +- .pre-commit-config.yaml | 4 ++-- mypy-ratchet.json | 3 ++- pyproject.toml | 2 +- requirements.dev.txt | 12 +----------- requirements.prod.txt | 6 ------ 6 files changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index ea5d104e..8a83de96 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.11" cache: "pip" cache-dependency-path: requirements.*.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d4e72a5f..02eb6fcb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ --- default_language_version: - python: python3.10 + python: python3.11 repos: - repo: https://github.com/adamchainz/django-upgrade rev: 1.24.0 @@ -23,4 +23,4 @@ repos: hooks: - id: pyupgrade args: - - --py310-plus + - --py311-plus diff --git a/mypy-ratchet.json b/mypy-ratchet.json index 55ea6bcd..15ec7ce4 100644 --- a/mypy-ratchet.json +++ b/mypy-ratchet.json @@ -2,7 +2,8 @@ "cbv/importer/importers.py": { "Call to untyped function \"get_code\" in typed context [no-untyped-call]": 1, "Function is missing a type annotation [no-untyped-def]": 1, - "Function is missing a type annotation for one or more arguments [no-untyped-def]": 12 + "Function is missing a type annotation for one or more arguments [no-untyped-def]": 12, + "Module has no attribute \"formatargspec\" [attr-defined]": 1 }, "cbv/management/commands/cbv_dumpversion.py": { "Function is missing a type annotation [no-untyped-def]": 1 diff --git a/pyproject.toml b/pyproject.toml index d37213ce..4e1daa69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ python_files = [ extend-exclude = [ ".env", ] -target-version = "py310" +target-version = "py311" [tool.ruff.lint] extend-select = [ diff --git a/requirements.dev.txt b/requirements.dev.txt index bbedc536..68b3d4bf 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -6,8 +6,6 @@ coverage==7.8.0 # via -r requirements.dev.in distlib==0.3.9 # via virtualenv -exceptiongroup==1.2.2 - # via pytest factory-boy==3.2.0 # via -r requirements.dev.in faker==9.3.1 @@ -52,19 +50,11 @@ six==1.16.0 # python-dateutil text-unidecode==1.3 # via faker -tomli==2.2.1 - # via - # -c requirements.prod.txt - # coverage - # mypy - # pytest types-requests==2.27.7 # via -r requirements.dev.in types-urllib3==1.26.7 # via types-requests typing-extensions==4.13.2 - # via - # -c requirements.prod.txt - # mypy + # via mypy virtualenv==20.30.0 # via pre-commit diff --git a/requirements.prod.txt b/requirements.prod.txt index e4c1c188..81e9cca2 100644 --- a/requirements.prod.txt +++ b/requirements.prod.txt @@ -83,12 +83,6 @@ sphinxcontrib-serializinghtml==2.0.0 # via sphinx sqlparse==0.5.3 # via django -tomli==2.2.1 - # via sphinx -typing-extensions==4.13.2 - # via - # asgiref - # environs urllib3==2.4.0 # via requests werkzeug==3.1.3 From b2c5b2a5948f9e004cb3149e24eb63eb85b61399 Mon Sep 17 00:00:00 2001 From: George Hickman Date: Sun, 27 Apr 2025 12:09:36 +0100 Subject: [PATCH 2/3] Upgrade Python to 3.12 --- .github/workflows/python-tests.yml | 2 +- .pre-commit-config.yaml | 4 ++-- pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 8a83de96..7df9c779 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" cache: "pip" cache-dependency-path: requirements.*.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 02eb6fcb..4c5f27e9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ --- default_language_version: - python: python3.11 + python: python3.12 repos: - repo: https://github.com/adamchainz/django-upgrade rev: 1.24.0 @@ -23,4 +23,4 @@ repos: hooks: - id: pyupgrade args: - - --py311-plus + - --py312-plus diff --git a/pyproject.toml b/pyproject.toml index 4e1daa69..4076d9a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ python_files = [ extend-exclude = [ ".env", ] -target-version = "py311" +target-version = "py312" [tool.ruff.lint] extend-select = [ From f3e0ceb7ec224210fabe1affe5d07dbd1cbe607e Mon Sep 17 00:00:00 2001 From: George Hickman Date: Sun, 27 Apr 2025 12:20:22 +0100 Subject: [PATCH 3/3] Upgrade Python 3.13 --- .github/workflows/python-tests.yml | 2 +- .pre-commit-config.yaml | 8 ++++---- pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 7df9c779..e72411fd 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.12" + python-version: "3.13" cache: "pip" cache-dependency-path: requirements.*.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4c5f27e9..2076d158 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ --- default_language_version: - python: python3.12 + python: python3.13 repos: - repo: https://github.com/adamchainz/django-upgrade rev: 1.24.0 @@ -14,13 +14,13 @@ repos: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.4 + rev: v0.11.7 hooks: - id: ruff - repo: https://github.com/asottile/pyupgrade - rev: v3.15.2 + rev: v3.19.1 hooks: - id: pyupgrade args: - - --py312-plus + - --py313-plus diff --git a/pyproject.toml b/pyproject.toml index 4076d9a7..38eb606e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ python_files = [ extend-exclude = [ ".env", ] -target-version = "py312" +target-version = "py313" [tool.ruff.lint] extend-select = [