Skip to content

Commit 312eb38

Browse files
committed
Update Python support matrix
Also add pyupgrade + update GHA config more generally.
1 parent f5f009a commit 312eb38

File tree

5 files changed

+29
-15
lines changed

5 files changed

+29
-15
lines changed

.github/workflows/build.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,42 @@ on:
55

66
jobs:
77
mypy:
8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-slim
99
steps:
1010
- uses: actions/checkout@v6
1111
- uses: actions/setup-python@v6
1212
with:
13-
python-version: "3.12"
14-
- run: python -m pip install tox
13+
python-version: "3.14"
14+
- run: python -m pip install tox tox-uv
1515
- run: python -m tox -e mypy
1616

1717
check-pacakge-build:
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-slim
1919
steps:
2020
- uses: actions/checkout@v6
2121
- uses: actions/setup-python@v6
2222
with:
23-
python-version: "3.12"
24-
- run: python -m pip install tox
23+
python-version: "3.14"
24+
- run: python -m pip install tox tox-uv
2525
- run: python -m tox -e twine-check
2626

2727
test:
2828
strategy:
2929
matrix:
30-
os: [windows-latest, macos-latest, ubuntu-latest]
31-
py: ['3.8', '3.12']
32-
name: "Run Tests on ${{ matrix.os }}, py${{ matrix.py }}"
33-
runs-on: ${{ matrix.os }}
30+
os:
31+
- name: Windows
32+
runner: windows-latest
33+
- name: macOS
34+
runner: macos-latest
35+
- name: Linux
36+
runner: ubuntu-latest
37+
py: ['3.10', '3.11', '3.12', '3.13', '3.14']
38+
name: "Test py${{ matrix.py }} (${{ matrix.os.name }})"
39+
runs-on: ${{ matrix.os.runner }}
3440
steps:
3541
- uses: actions/checkout@v6
3642
- uses: actions/setup-python@v6
3743
with:
3844
python-version: ${{ matrix.py }}
39-
- run: python -m pip install tox
45+
- run: python -m pip install tox tox-uv
4046
- run: python -m tox -e py

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ repos:
2929
rev: 7.0.0
3030
hooks:
3131
- id: isort
32+
- repo: https://github.com/asottile/pyupgrade
33+
rev: v3.19.1
34+
hooks:
35+
- id: pyupgrade
36+
args: ["--py310-plus"]
3237
- repo: local
3338
hooks:
3439
- id: check-hook-name-length

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ following sample config:
218218

219219
<!-- bumpversion-changelog -->
220220

221+
- Support Python 3.14
222+
- Remove support for Python 3.8 and 3.9
223+
221224
### 0.7.1
222225

223226
- The output format when `--show-changes` is passed to hooks has changed

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi"
66

77
[project]
88
name = "texthooks"
9-
requires-python = ">=3.8"
9+
requires-python = ">=3.10"
1010
version = "0.7.1"
1111
description = "pre-commit fixers and linters for handling text files"
1212
readme = "README.md"
@@ -19,11 +19,11 @@ classifiers = [
1919
"Intended Audience :: Developers",
2020
"License :: OSI Approved :: Apache Software License",
2121
"Programming Language :: Python",
22-
"Programming Language :: Python :: 3.8",
23-
"Programming Language :: Python :: 3.9",
2422
"Programming Language :: Python :: 3.10",
2523
"Programming Language :: Python :: 3.11",
2624
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3.13",
26+
"Programming Language :: Python :: 3.14",
2727
]
2828

2929
dependencies = ["identify>=2.0,<3.0"]

src/texthooks/_recorders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _determine_encoding() -> str:
5050

5151

5252
def _readlines(filename: str, encoding: str) -> t.List[str]:
53-
with open(filename, "r", encoding=encoding) as f:
53+
with open(filename, encoding=encoding) as f:
5454
return f.readlines()
5555

5656

0 commit comments

Comments
 (0)