Skip to content

Commit 0acea4f

Browse files
authored
Add 3.13 to CI (#359)
1 parent 4dc2a8f commit 0acea4f

File tree

6 files changed

+75
-57
lines changed

6 files changed

+75
-57
lines changed

.github/workflows/check.yml

+16-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: check
22
on:
33
workflow_dispatch:
44
push:
5-
branches: "main"
5+
branches: ["main"]
66
tags-ignore: ["**"]
77
pull_request:
88
schedule:
@@ -26,8 +26,7 @@ jobs:
2626
- "3.10"
2727
- "3.9"
2828
- "3.8"
29-
- "pypy3.9"
30-
- "pypy3.8"
29+
- "pypy3.10"
3130
os:
3231
- ubuntu-latest
3332
- windows-latest
@@ -37,9 +36,9 @@ jobs:
3736
- name: Setup python for tox
3837
uses: actions/setup-python@v5
3938
with:
40-
python-version: "3.11"
39+
python-version: "3.12"
4140
- name: Install tox
42-
run: python -m pip install tox
41+
run: python -m pip install tox-uv
4342
- uses: actions/checkout@v4
4443
with:
4544
fetch-depth: 0
@@ -79,10 +78,12 @@ jobs:
7978
shell: python
8079
- if: ${{ !startsWith(matrix.py, 'pypy')}}
8180
name: Upload coverage data
82-
uses: actions/upload-artifact@v3
81+
uses: actions/upload-artifact@v4
8382
with:
84-
name: coverage-data
83+
include-hidden-files: true
84+
name: .coverage.${{ matrix.os }}.${{ matrix.py }}
8585
path: ".tox/.coverage.*"
86+
retention-days: 3
8687

8788
coverage:
8889
name: Combine coverage
@@ -94,28 +95,29 @@ jobs:
9495
fetch-depth: 0
9596
- uses: actions/setup-python@v5
9697
with:
97-
python-version: "3.11"
98+
python-version: "3.12"
9899
- name: Install tox
99-
run: python -m pip install tox build
100+
run: python -m pip install tox-uv build[uv]
100101
- name: Setup coverage tool
101102
run: tox -e coverage --notest
102103
- name: Install package builder
103104
run: python -m pip install build
104105
- name: Build package
105106
run: pyproject-build --wheel .
106107
- name: Download coverage data
107-
uses: actions/download-artifact@v4.1.7
108+
uses: actions/download-artifact@v4
108109
with:
109-
name: coverage-data
110110
path: .tox
111+
pattern: .coverage.*
112+
merge-multiple: true
111113
- name: Show contents
112114
run: ls -alth *
113115
- name: pwd
114116
run: pwd
115117
- name: Combine and report coverage
116118
run: tox -e coverage
117119
- name: Upload HTML report
118-
uses: actions/upload-artifact@v3
120+
uses: actions/upload-artifact@v4
119121
with:
120122
name: html-report
121123
path: .tox/htmlcov
@@ -140,10 +142,10 @@ jobs:
140142
- uses: actions/checkout@v4
141143
with:
142144
fetch-depth: 0
143-
- name: Setup Python "3.11"
145+
- name: Setup Python
144146
uses: actions/setup-python@v5
145147
with:
146-
python-version: "3.11"
148+
python-version: "3.12"
147149
- name: Install tox
148150
run: python -m pip install tox
149151
- name: Setup test suite

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup python to build package
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: "3.11"
18+
python-version: "3.12"
1919
- name: Install build
2020
run: python -m pip install build
2121
- uses: actions/checkout@v4

.pre-commit-config.yaml

+16-5
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,38 @@ repos:
44
hooks:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
7+
- repo: https://github.com/python-jsonschema/check-jsonschema
8+
rev: 0.29.2
9+
hooks:
10+
- id: check-github-workflows
11+
args: ["--verbose"]
712
- repo: https://github.com/codespell-project/codespell
813
rev: v2.3.0
914
hooks:
1015
- id: codespell
11-
args: ["--write-changes"]
16+
additional_dependencies: ["tomli>=2.0.1"]
1217
- repo: https://github.com/tox-dev/tox-ini-fmt
13-
rev: "1.3.1"
18+
rev: "1.3.2"
1419
hooks:
1520
- id: tox-ini-fmt
1621
args: ["-p", "fix"]
1722
- repo: https://github.com/tox-dev/pyproject-fmt
1823
rev: "2.2.1"
1924
hooks:
2025
- id: pyproject-fmt
21-
additional_dependencies: ["tox>=4.12.1"]
22-
- repo: https://github.com/astral-sh/ruff-pre-commit
23-
rev: "v0.6.3"
26+
- repo: https://github.com/astral-sh/ruff-pre-commit
27+
rev: "v0.6.4"
2428
hooks:
2529
- id: ruff-format
2630
- id: ruff
2731
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
32+
- repo: https://github.com/rbubley/mirrors-prettier
33+
rev: "v3.3.3" # Use the sha / tag you want to point at
34+
hooks:
35+
- id: prettier
36+
additional_dependencies:
37+
38+
- "@prettier/[email protected]"
2839
- repo: meta
2940
hooks:
3041
- id: check-hooks-apply

pyproject.toml

+20-15
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
build-backend = "hatchling.build"
33
requires = [
44
"hatch-vcs>=0.4",
5-
"hatchling>=1.18",
5+
"hatchling>=1.25",
66
]
77

88
[project]
@@ -33,6 +33,7 @@ classifiers = [
3333
"Programming Language :: Python :: 3.10",
3434
"Programming Language :: Python :: 3.11",
3535
"Programming Language :: Python :: 3.12",
36+
"Programming Language :: Python :: 3.13",
3637
"Topic :: Internet",
3738
"Topic :: Software Development :: Libraries",
3839
"Topic :: System",
@@ -41,23 +42,23 @@ dynamic = [
4142
"version",
4243
]
4344
optional-dependencies.docs = [
44-
"furo>=2023.9.10",
45-
"sphinx>=7.2.6",
46-
"sphinx-autodoc-typehints!=1.23.4,>=1.25.2",
45+
"furo>=2024.8.6",
46+
"sphinx>=8.0.2",
47+
"sphinx-autodoc-typehints!=1.23.4,>=2.4",
4748
]
4849
optional-dependencies.testing = [
4950
"covdefaults>=2.3",
50-
"coverage>=7.3.2",
51-
"diff-cover>=8.0.1",
52-
"pytest>=7.4.3",
53-
"pytest-asyncio>=0.21",
54-
"pytest-cov>=4.1",
55-
"pytest-mock>=3.12",
56-
"pytest-timeout>=2.2",
57-
"virtualenv>=20.26.2",
51+
"coverage>=7.6.1",
52+
"diff-cover>=9.1.1",
53+
"pytest>=8.3.2",
54+
"pytest-asyncio>=0.24",
55+
"pytest-cov>=5",
56+
"pytest-mock>=3.14",
57+
"pytest-timeout>=2.3.1",
58+
"virtualenv>=20.26.3",
5859
]
5960
optional-dependencies.typing = [
60-
"typing-extensions>=4.8; python_version<'3.11'",
61+
"typing-extensions>=4.12.2; python_version<'3.11'",
6162
]
6263
urls.Documentation = "https://py-filelock.readthedocs.io"
6364
urls.Homepage = "https://github.com/tox-dev/py-filelock"
@@ -91,15 +92,16 @@ lint.ignore = [
9192
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
9293
"D301", # Use `r"""` if any backslashes in a docstring
9394
"D401", # First line of docstring should be in imperative mood
95+
"DOC", # no support yet
9496
"ISC001", # Conflict with formatter
9597
"S104", # Possible binding to all interface
9698
]
9799
lint.per-file-ignores."tests/**/*.py" = [
98100
"D", # don"t care about documentation in tests
99-
"FBT", # don"t care about booleans as positional arguments in tests
101+
"FBT", # don't care about booleans as positional arguments in tests
100102
"INP001", # no implicit namespace
101103
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
102-
"S101", # asserts allowed in tests...
104+
"S101", # asserts allowed in tests
103105
"S603", # `subprocess` call: check for execution of untrusted input
104106
]
105107
lint.isort = { known-first-party = [
@@ -115,6 +117,9 @@ count = true
115117
quiet-level = 3
116118
ignore-words-list = "master"
117119

120+
[tool.pyproject-fmt]
121+
max_supported_python = "3.13"
122+
118123
[tool.coverage]
119124
html.show_contexts = true
120125
html.skip_covered = false

src/filelock/asyncio.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""An asyncio-based implementation of the file lock."""
1+
"""An asyncio-based implementation of the file lock.""" # noqa: A005
22

33
from __future__ import annotations
44

tox.ini

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[tox]
22
requires =
33
tox>=4.2
4+
tox-uv>=1.11.3
45
env_list =
56
fix
6-
py313
7-
py312
8-
py311
9-
py310
10-
py39
11-
py38
12-
py37
137
type
148
coverage
159
docs
1610
readme
11+
3.13
12+
3.12
13+
3.11
14+
3.10
15+
3.9
16+
3.8
1717
skip_missing_interpreters = true
1818

1919
[testenv]
@@ -39,15 +39,15 @@ description = format the code base to adhere to our styles, and complain about w
3939
base_python = python3.10
4040
skip_install = true
4141
deps =
42-
pre-commit>=3.5
42+
pre-commit>=3.8
4343
commands =
4444
pre-commit run --all-files --show-diff-on-failure
4545
python -c 'import pathlib; print("hint: run \{\} install to add checks as pre-commit hook".format(pathlib.Path(r"{envdir}") / "bin" / "pre-commit"))'
4646

4747
[testenv:type]
4848
description = run type check on code base
4949
deps =
50-
mypy==1.7.1
50+
mypy==1.11.2
5151
set_env =
5252
{tty:MYPY_FORCE_COLOR = 1}
5353
commands =
@@ -59,8 +59,8 @@ description = combine coverage files and generate diff (against DIFF_AGAINST def
5959
skip_install = true
6060
deps =
6161
covdefaults>=2.3
62-
coverage[toml]>=7.3.2
63-
diff-cover>=8.0.1
62+
coverage[toml]>=7.6.1
63+
diff-cover>=9.1.1
6464
extras =
6565
parallel_show_output = true
6666
pass_env =
@@ -74,11 +74,12 @@ commands =
7474
coverage html -d {toxworkdir}/htmlcov
7575
diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}/coverage.xml
7676
depends =
77-
py311
78-
py310
79-
py39
80-
py38
81-
py37
77+
3.13
78+
3.12
79+
3.11
80+
3.10
81+
3.9
82+
3.8
8283

8384
[testenv:docs]
8485
description = build documentation
@@ -92,11 +93,11 @@ commands =
9293
description = check that the long description is valid (need for PyPI)
9394
skip_install = true
9495
deps =
95-
build[virtualenv]>=1.0.3
96-
twine>=4.0.2
96+
build[uv]>=1.2.2
97+
twine>=5.1.1
9798
extras =
9899
commands =
99-
pyproject-build -o {envtmpdir} --wheel --sdist .
100+
pyproject-build -o {envtmpdir} --installer uv --wheel --sdist .
100101
twine check {envtmpdir}/*
101102

102103
[testenv:dev]
@@ -106,6 +107,5 @@ extras =
106107
docs
107108
testing
108109
commands =
109-
python -m pip list --format=columns
110+
uv pip tree
110111
python -c 'import sys; print(sys.executable)'
111-
uv_seed = true

0 commit comments

Comments
 (0)