Skip to content

Commit 0c54837

Browse files
authored
Add support for 3.14 (#432)
1 parent 77d02f5 commit 0c54837

File tree

8 files changed

+266
-228
lines changed

8 files changed

+266
-228
lines changed

.github/workflows/check.yaml

Lines changed: 42 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: check
1+
name: "🛠️ check"
22
on:
33
workflow_dispatch:
44
push:
@@ -14,65 +14,59 @@ concurrency:
1414

1515
jobs:
1616
test:
17-
name: test ${{ matrix.py }} - ${{ matrix.os }}
17+
name: "🧪 Test ${{ matrix.py }} - ${{ matrix.os }}"
1818
runs-on: ${{ matrix.os }}
1919
strategy:
2020
fail-fast: false
2121
matrix:
2222
py:
23-
- "pypy3.10" # ahead to start it earlier because takes longer
23+
- "3.14"
2424
- "3.13"
2525
- "3.12"
2626
- "3.11"
2727
- "3.10"
2828
- "3.9"
29+
- "pypy3.11"
2930
os:
30-
- ubuntu-latest
31-
- windows-latest
32-
- macos-latest
31+
- ubuntu-24.04
32+
- windows-2025
33+
- macos-15
34+
exclude:
35+
- { os: windows-2025, py: pypy3.11 }
3336

3437
steps:
3538
- uses: actions/checkout@v5
3639
with:
3740
fetch-depth: 0
38-
- name: Install the latest version of uv
41+
- name: "🔄 Install the latest version of uv"
3942
uses: astral-sh/setup-uv@v6
40-
with:
41-
enable-cache: true
42-
cache-dependency-glob: "pyproject.toml"
43-
github-token: ${{ secrets.GITHUB_TOKEN }}
44-
- name: Add .local/bin to Windows PATH
45-
if: runner.os == 'Windows'
46-
shell: bash
47-
run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
48-
- name: Install tox
43+
- name: "🧪 Install tox"
4944
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
50-
- name: Install Python
45+
- name: "🐍 Install Python"
5146
run: uv python install --python-preference only-managed ${{ matrix.py }}
52-
- name: Setup test suite
47+
- name: "⚙️ Setup test suite"
5348
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.py }}
5449
env:
5550
UV_PYTHON_PREFERENCE: only-managed
56-
- name: Run test suite
57-
if: ${{ !startsWith(matrix.py, 'pypy')}}
58-
run: tox run --skip-pkg-install -e ${{ matrix.py }}
59-
env:
60-
PYTEST_ADDOPTS: "-vv --durations=20"
61-
DIFF_AGAINST: HEAD
62-
UV_PYTHON_PREFERENCE: only-managed
63-
- name: Run test suite without coverage
64-
if: ${{ startsWith(matrix.py, 'pypy')}}
65-
run: tox run --skip-pkg-install -e ${{ matrix.py }} --
51+
- name: "✅ Run test suite"
52+
run: |
53+
if [[ "${{ matrix.py }}" == pypy* ]]; then
54+
tox run --skip-pkg-install -e ${{ matrix.py }} --
55+
else
56+
tox run --skip-pkg-install -e ${{ matrix.py }}
57+
fi
58+
shell: bash
6659
env:
6760
PYTEST_ADDOPTS: "-vv --durations=20"
6861
UV_PYTHON_PREFERENCE: only-managed
69-
- name: Rename coverage report file
62+
DIFF_AGAINST: HEAD
63+
- name: "📝 Rename coverage report file"
7064
if: ${{ !startsWith(matrix.py, 'pypy')}}
7165
run: |
7266
import os; import sys
7367
os.rename(f".tox/.coverage.${{ matrix.py }}", f".tox/.coverage.${{ matrix.py }}-{sys.platform}")
7468
shell: python
75-
- name: Upload coverage data
69+
- name: "📦 Upload coverage data"
7670
if: ${{ !startsWith(matrix.py, 'pypy')}}
7771
uses: actions/upload-artifact@v4
7872
with:
@@ -82,84 +76,68 @@ jobs:
8276
retention-days: 3
8377

8478
coverage:
85-
name: Combine coverage
86-
runs-on: ubuntu-latest
79+
name: "📊 Combine coverage"
80+
runs-on: ubuntu-24.04
8781
needs: test
8882
steps:
8983
- uses: actions/checkout@v5
9084
with:
9185
fetch-depth: 0
92-
- name: Install the latest version of uv
86+
- name: "🔄 Install the latest version of uv"
9387
uses: astral-sh/setup-uv@v6
94-
with:
95-
enable-cache: true
96-
cache-dependency-glob: "pyproject.toml"
97-
github-token: ${{ secrets.GITHUB_TOKEN }}
98-
- name: Add .local/bin to Windows PATH
99-
if: runner.os == 'Windows'
100-
shell: bash
101-
run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
102-
- name: Install hatch
88+
- name: "🧪 Install tox"
10389
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
104-
- name: Build package to generate version
90+
- name: "📦 Build package to generate version"
10591
run: uv build --python 3.13 --python-preference only-managed --wheel . --out-dir dist
106-
- name: Setup coverage tool
92+
- name: "⚙️ Setup coverage tool"
10793
run: tox -e coverage --notest
10894
env:
10995
UV_PYTHON_PREFERENCE: only-managed
110-
- name: Download coverage data
96+
- name: "⬇️ Download coverage data"
11197
uses: actions/download-artifact@v5
11298
with:
11399
path: .tox
114100
pattern: .coverage.*
115101
merge-multiple: true
116-
- name: Combine and report coverage
102+
- name: "📊 Combine and report coverage"
117103
run: tox -e coverage --skip-pkg-install
118104
env:
119105
UV_PYTHON_PREFERENCE: only-managed
120-
- name: Upload HTML report
106+
- name: "📤 Upload HTML report"
121107
uses: actions/upload-artifact@v4
122108
with:
123109
name: html-report
124110
path: .tox/htmlcov
125111

126112
check:
127-
name: ${{ matrix.tox_env }} - ${{ matrix.os }}
113+
name: "🔎 ${{ matrix.tox_env }} - ${{ matrix.os }}"
128114
runs-on: ${{ matrix.os }}
129115
strategy:
130116
fail-fast: false
131117
matrix:
132118
os:
133-
- ubuntu-latest
134-
- windows-latest
119+
- ubuntu-24.04
120+
- windows-2025
135121
tox_env:
136122
- dev
137123
- type
138124
- docs
139-
- readme
125+
- pkg_meta
140126
exclude:
141-
- { os: windows-latest, tox_env: readme }
127+
- { os: windows-2025, tox_env: pkg_meta }
142128
steps:
143129
- uses: actions/checkout@v5
144130
with:
145131
fetch-depth: 0
146-
- name: Install the latest version of uv
132+
- name: "🔄 Install the latest version of uv"
147133
uses: astral-sh/setup-uv@v6
148-
with:
149-
enable-cache: true
150-
cache-dependency-glob: "pyproject.toml"
151-
github-token: ${{ secrets.GITHUB_TOKEN }}
152-
- name: Add .local/bin to Windows PATH
153-
if: runner.os == 'Windows'
154-
shell: bash
155-
run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
156-
- name: Install tox
134+
- name: "🧪 Install tox"
157135
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
158-
- name: Setup test suite
136+
- name: "⚙️ Setup test suite"
159137
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
160138
env:
161139
UV_PYTHON_PREFERENCE: only-managed
162-
- name: Run test suite
140+
- name: "Run test suite"
163141
run: tox run --skip-pkg-install -e ${{ matrix.tox_env }}
164142
env:
165143
UV_PYTHON_PREFERENCE: only-managed

.github/workflows/release.yaml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release to PyPI
1+
name: 🚀Release to PyPI
22
on:
33
push:
44
tags: ["*"]
@@ -8,20 +8,16 @@ env:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- uses: actions/checkout@v5
1414
with:
1515
fetch-depth: 0
16-
- name: Install the latest version of uv
16+
- name: "🔄 Install the latest version of uv"
1717
uses: astral-sh/setup-uv@v6
18-
with:
19-
enable-cache: true
20-
cache-dependency-glob: "pyproject.toml"
21-
github-token: ${{ secrets.GITHUB_TOKEN }}
22-
- name: Build package
18+
- name: "📦 Build package"
2319
run: uv build --python 3.13 --python-preference only-managed --sdist --wheel . --out-dir dist
24-
- name: Store the distribution packages
20+
- name: "📤 Store the distribution packages"
2521
uses: actions/upload-artifact@v4
2622
with:
2723
name: ${{ env.dists-artifact-name }}
@@ -30,19 +26,17 @@ jobs:
3026
release:
3127
needs:
3228
- build
33-
runs-on: ubuntu-latest
29+
runs-on: ubuntu-24.04
3430
environment:
35-
name: release
31+
name: "🚀 Release to PyPI"
3632
url: https://pypi.org/project/filelock/${{ github.ref_name }}
3733
permissions:
3834
id-token: write
3935
steps:
40-
- name: Download all the dists
36+
- name: "⬇️ Download all the dists"
4137
uses: actions/download-artifact@v5
4238
with:
4339
name: ${{ env.dists-artifact-name }}
4440
path: dist/
45-
- name: Publish to PyPI
41+
- name: "🚀 Publish to PyPI"
4642
uses: pypa/gh-action-pypi-publish@v1.12.4
47-
with:
48-
attestations: true

.pre-commit-config.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ repos:
1414
hooks:
1515
- id: codespell
1616
additional_dependencies: ["tomli>=2.2.1"]
17-
- repo: https://github.com/tox-dev/tox-ini-fmt
18-
rev: "1.6.0"
17+
- repo: https://github.com/tox-dev/tox-toml-fmt
18+
rev: "v1.0.0"
1919
hooks:
20-
- id: tox-ini-fmt
21-
args: ["-p", "fix"]
20+
- id: tox-toml-fmt
2221
- repo: https://github.com/tox-dev/pyproject-fmt
2322
rev: "v2.6.0"
2423
hooks:
@@ -34,8 +33,8 @@ repos:
3433
hooks:
3534
- id: prettier
3635
additional_dependencies:
37-
- prettier@3.4.2
38-
- "@prettier/plugin-xml@3.4.1"
36+
- prettier@3.6.2
37+
- "@prettier/plugin-xml@3.4.2"
3938
- repo: meta
4039
hooks:
4140
- id: check-hooks-apply

.readthedocs.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
version: 2
22
build:
3-
os: ubuntu-22.04
3+
os: ubuntu-lts-latest
44
tools:
55
python: "3"
6-
python:
7-
install:
8-
- method: pip
9-
path: .
10-
extra_requirements:
11-
- docs
12-
sphinx:
13-
builder: html
14-
configuration: docs/conf.py
15-
fail_on_warning: true
6+
commands:
7+
- pip install uv
8+
- uv venv
9+
- uv pip install tox-uv
10+
- .venv/bin/tox run -e docs --

0 commit comments

Comments
 (0)