Skip to content

Commit

Permalink
feature: Add support for Python 3.13
Browse files Browse the repository at this point in the history
Also bump multiple tools to use Python 3.13.

The default version specification is removed from the pre-commit
configuration. In practice, linters are stable across Python versions,
and making pre-commit always fail unless matching a specific Python
version is more annoying than it is helpful.
  • Loading branch information
aiven-anton committed Nov 1, 2024
1 parent 797e8b9 commit e66f49c
Show file tree
Hide file tree
Showing 8 changed files with 191 additions and 173 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
name: Static analysis
uses: less-action/reusables/.github/workflows/pre-commit.yaml@0f0da22d88bdf0d450cf3f20a5709f4b74cfa1fb
with:
python-version: "3.11"
python-version: "3.13"

check-build:
name: Check packaging metadata
Expand All @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4

Expand All @@ -90,7 +90,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4

Expand All @@ -112,7 +112,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.13"
cache: pip
cache-dependency-path: setup.cfg
check-latest: true
Expand All @@ -153,10 +153,10 @@ jobs:
key: >-
${{ runner.os }}
-pre-commit
-3.11
-3.13
-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pre-commit-3.11
${{ runner.os }}-pre-commit-3.13
${{ runner.os }}-pre-commit
- name: Schema cache
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.13"
cache: pip
cache-dependency-path: docs/requirements.txt
- name: Install dependencies
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.13"
cache: pip
cache-dependency-path: docs/requirements.txt
- name: Upgrade package tooling
run: pip install --upgrade pip setuptools
- name: Install kio dependencies
run: pip install --upgrade -e '.[all]'
- name: Install documentation dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.13
cache: pip
cache-dependency-path: pyproject.toml
check-latest: true
Expand Down
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
default_language_version:
python: python3.11
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.5.0"
Expand Down
1 change: 1 addition & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ help:

requirements: export CUSTOM_COMPILE_COMMAND='make requirements'
requirements:
pip install --upgrade pip setuptools wheel pip-tools
@pip-compile --config=pyproject.toml
2 changes: 1 addition & 1 deletion docs/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "kio-docs"
version = "0"
requires-python = ">3.11,<3.12"
requires-python = ">=3.13,<3.14"
classifiers = ["Private :: Do Not Upload"]
dependencies = [
"sphinx",
Expand Down
334 changes: 175 additions & 159 deletions docs/requirements.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
"Topic :: Database",
]
Expand Down

0 comments on commit e66f49c

Please sign in to comment.