Skip to content

Commit f7c3f8e

Browse files
authored
Add 3.14 support and drop 3.9 (#448)
1 parent a95eec6 commit f7c3f8e

File tree

7 files changed

+34
-34
lines changed

7 files changed

+34
-34
lines changed

.github/workflows/check.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
- "3.12"
2727
- "3.11"
2828
- "3.10"
29-
- "3.9"
3029
- "pypy3.11"
3130
os:
3231
- ubuntu-24.04
@@ -42,7 +41,7 @@ jobs:
4241
- name: "🔄 Install the latest version of uv"
4342
uses: astral-sh/setup-uv@v7
4443
- name: "🧪 Install tox"
45-
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
44+
run: uv tool install --python-preference only-managed --python 3.14 tox --with tox-uv
4645
- name: "🐍 Install Python"
4746
run: uv python install --python-preference only-managed ${{ matrix.py }}
4847
- name: "⚙️ Setup test suite"
@@ -87,9 +86,9 @@ jobs:
8786
- name: "🔄 Install the latest version of uv"
8887
uses: astral-sh/setup-uv@v7
8988
- name: "🧪 Install tox"
90-
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
89+
run: uv tool install --python-preference only-managed --python 3.14 tox --with tox-uv
9190
- name: "📦 Build package to generate version"
92-
run: uv build --python 3.13 --python-preference only-managed --wheel . --out-dir dist
91+
run: uv build --python 3.14 --python-preference only-managed --wheel . --out-dir dist
9392
- name: "⚙️ Setup coverage tool"
9493
run: tox -e coverage --notest
9594
env:
@@ -133,7 +132,7 @@ jobs:
133132
- name: "🔄 Install the latest version of uv"
134133
uses: astral-sh/setup-uv@v7
135134
- name: "🧪 Install tox"
136-
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
135+
run: uv tool install --python-preference only-managed --python 3.14 tox --with tox-uv
137136
- name: "⚙️ Setup test suite"
138137
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
139138
env:

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: "🔄 Install the latest version of uv"
1717
uses: astral-sh/setup-uv@v7
1818
- name: "📦 Build package"
19-
run: uv build --python 3.13 --python-preference only-managed --sdist --wheel . --out-dir dist
19+
run: uv build --python 3.14 --python-preference only-managed --sdist --wheel . --out-dir dist
2020
- name: "📤 Store the distribution packages"
2121
uses: actions/upload-artifact@v4
2222
with:

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ repos:
1515
- id: codespell
1616
additional_dependencies: ["tomli>=2.2.1"]
1717
- repo: https://github.com/tox-dev/tox-toml-fmt
18-
rev: "v1.0.0"
18+
rev: "v1.1.0"
1919
hooks:
2020
- id: tox-toml-fmt
2121
- repo: https://github.com/tox-dev/pyproject-fmt
22-
rev: "v2.7.0"
22+
rev: "v2.8.0"
2323
hooks:
2424
- id: pyproject-fmt
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: "v0.13.3"
26+
rev: "v0.14.0"
2727
hooks:
2828
- id: ruff-format
29-
- id: ruff
29+
- id: ruff-check
3030
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
3131
- repo: https://github.com/rbubley/mirrors-prettier
3232
rev: "v3.6.2" # Use the sha / tag you want to point at

pyproject.toml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ license = "Unlicense"
2020
maintainers = [
2121
{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" },
2222
]
23-
requires-python = ">=3.9"
23+
requires-python = ">=3.10"
2424
classifiers = [
2525
"Development Status :: 5 - Production/Stable",
2626
"Intended Audience :: Developers",
2727
"License :: OSI Approved :: The Unlicense (Unlicense)",
2828
"Operating System :: OS Independent",
2929
"Programming Language :: Python",
3030
"Programming Language :: Python :: 3 :: Only",
31-
"Programming Language :: Python :: 3.9",
3231
"Programming Language :: Python :: 3.10",
3332
"Programming Language :: Python :: 3.11",
3433
"Programming Language :: Python :: 3.12",
3534
"Programming Language :: Python :: 3.13",
35+
"Programming Language :: Python :: 3.14",
3636
"Topic :: Internet",
3737
"Topic :: Software Development :: Libraries",
3838
"Topic :: System",
@@ -57,36 +57,36 @@ dev = [
5757

5858
test = [
5959
"covdefaults>=2.3",
60-
"diff-cover>=9.6",
61-
"pytest>=8.4.1",
62-
"pytest-asyncio>=1.1",
63-
"pytest-cov>=6.2.1",
64-
"pytest-mock>=3.14.1",
60+
"diff-cover>=9.7.1",
61+
"pytest>=8.4.2",
62+
"pytest-asyncio>=1.2",
63+
"pytest-cov>=7",
64+
"pytest-mock>=3.15.1",
6565
"pytest-timeout>=2.4",
66-
"virtualenv>=20.33.1",
66+
"virtualenv>=20.34",
6767
]
6868
type = [
69-
"mypy>=1.17.1",
70-
"typing-extensions>=4.14.1; python_version<'3.11'",
69+
"mypy>=1.18.2",
70+
"typing-extensions>=4.15; python_version<'3.11'",
7171
{ include-group = "test" },
7272
]
7373
docs = [
74-
"furo>=2025.7.19",
74+
"furo>=2025.9.25",
7575
"sphinx>=8.2.3",
7676
"sphinx-autodoc-typehints>=3.2",
7777
]
7878
fix = [
79-
"pre-commit-uv>=4.1.4",
79+
"pre-commit-uv>=4.1.5",
8080
]
8181
pkg-meta = [
8282
"check-wheel-contents>=0.6.3",
83-
"twine>=6.1",
84-
"uv>=0.8.5",
83+
"twine>=6.2",
84+
"uv>=0.8.22",
8585
]
8686
coverage = [
8787
"covdefaults>=2.3",
88-
"coverage[toml]>=7.10.2",
89-
"diff-cover>=9.6",
88+
"coverage[toml]>=7.10.7",
89+
"diff-cover>=9.7.1",
9090
]
9191

9292
[tool.hatch]
@@ -140,7 +140,7 @@ quiet-level = 3
140140
ignore-words-list = "master"
141141

142142
[tool.pyproject-fmt]
143-
max_supported_python = "3.13"
143+
max_supported_python = "3.14"
144144

145145
[tool.pytest.ini_options]
146146
asyncio_default_fixture_loop_scope = "session"

src/filelock/asyncio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from dataclasses import dataclass
1111
from inspect import iscoroutinefunction
1212
from threading import local
13-
from typing import TYPE_CHECKING, Any, Callable, NoReturn, cast
13+
from typing import TYPE_CHECKING, Any, NoReturn, cast
1414

1515
from ._api import BaseFileLock, FileLockContext, FileLockMeta
1616
from ._error import Timeout
@@ -20,6 +20,7 @@
2020

2121
if TYPE_CHECKING:
2222
import sys
23+
from collections.abc import Callable
2324
from concurrent import futures
2425
from types import TracebackType
2526

tests/test_filelock.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from pathlib import Path, PurePath
1313
from stat import S_IWGRP, S_IWOTH, S_IWUSR, filemode
1414
from types import TracebackType
15-
from typing import TYPE_CHECKING, Any, Callable, Union
15+
from typing import TYPE_CHECKING, Any
1616
from uuid import uuid4
1717
from weakref import WeakValueDictionary
1818

@@ -21,7 +21,7 @@
2121
from filelock import BaseFileLock, FileLock, SoftFileLock, Timeout, UnixFileLock, WindowsFileLock
2222

2323
if TYPE_CHECKING:
24-
from collections.abc import Iterator
24+
from collections.abc import Callable, Iterator
2525

2626
from pytest_mock import MockerFixture
2727

@@ -220,7 +220,7 @@ def test_nested_contruct(lock_type: type[BaseFileLock], tmp_path: Path) -> None:
220220
assert not lock_1.is_locked
221221

222222

223-
_ExcInfoType = Union[tuple[type[BaseException], BaseException, TracebackType], tuple[None, None, None]]
223+
_ExcInfoType = tuple[type[BaseException], BaseException, TracebackType] | tuple[None, None, None]
224224

225225

226226
class ExThread(threading.Thread):

tox.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
requires = [ "tox>=4.28.4" ]
2-
env_list = [ "fix", "3.14t", "3.14", "3.13", "3.12", "3.11", "3.10", "3.9", "coverage", "type", "docs", "pkg_meta" ]
1+
requires = [ "tox>=4.30.2" ]
2+
env_list = [ "fix", "3.14t", "3.14", "3.13", "3.12", "3.11", "3.10", "coverage", "type", "docs", "pkg_meta" ]
33
skip_missing_interpreters = true
44

55
[env_run_base]
@@ -71,7 +71,7 @@ commands = [
7171
],
7272
]
7373
parallel_show_output = true
74-
depends = [ "3.14t", "3.14", "3.13", "3.12", "3.11", "3.10", "3.9" ]
74+
depends = [ "3.14t", "3.14", "3.13", "3.12", "3.11", "3.10" ]
7575

7676
[env.fix]
7777
description = "format the code base to adhere to our styles, and complain about what we cannot do automatically"

0 commit comments

Comments
 (0)