diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8c54175..d3a8fdbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,9 +17,6 @@ jobs: fail-fast: false matrix: include: - - python-version: "3.9" - platform: ubuntu-latest - toxenv: py39 - python-version: "3.10" platform: ubuntu-latest toxenv: py310 @@ -32,18 +29,21 @@ jobs: - python-version: "3.13" platform: ubuntu-latest toxenv: py313 - - python-version: "3.9" + - python-version: "3.14" + platform: ubuntu-latest + toxenv: py314 + - python-version: "3.10" platform: macos-latest - toxenv: py39 - - python-version: "3.13" + toxenv: py310 + - python-version: "3.14" platform: macos-latest - toxenv: py313 - - python-version: "3.9" + toxenv: py314 + - python-version: "3.10" platform: windows-latest - toxenv: py39 - - python-version: "3.13" + toxenv: py310 + - python-version: "3.14" platform: windows-latest - toxenv: py313 + toxenv: py314 steps: - uses: actions/checkout@v4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bd25ed2d..04d8ffa0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.0 + rev: v0.14.4 hooks: - id: ruff-check args: [--fix] - id: ruff-format - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-ast - id: check-docstring-first diff --git a/pyproject.toml b/pyproject.toml index 858246e8..de4409ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ log_level = "DEBUG" [tool.ruff] fix = true -target-version = "py39" +target-version = "py310" [tool.ruff.lint] select = [ diff --git a/setup.cfg b/setup.cfg index 6b9b8c2d..85fe30d7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,7 +26,7 @@ package_dir = packages = fuzzfetch zip_safe = False -python_requires = >=3.9 +python_requires = >=3.10 [options.entry_points] console_scripts = diff --git a/src/fuzzfetch/args.py b/src/fuzzfetch/args.py index 000bddfa..23bdd644 100644 --- a/src/fuzzfetch/args.py +++ b/src/fuzzfetch/args.py @@ -3,21 +3,16 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. """Fuzzfetch argument parser""" -from __future__ import annotations - from argparse import ArgumentParser, Namespace +from collections.abc import Sequence from itertools import chain from logging import getLogger from pathlib import Path from platform import machine, system -from typing import TYPE_CHECKING from .models import BuildSearchOrder, Platform from .utils import extract_branch_from_ns, is_namespace -if TYPE_CHECKING: - from collections.abc import Sequence - LOG = getLogger("fuzzfetch") diff --git a/src/fuzzfetch/download.py b/src/fuzzfetch/download.py index 086fed1a..ab41e305 100644 --- a/src/fuzzfetch/download.py +++ b/src/fuzzfetch/download.py @@ -3,11 +3,8 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. """Fuzzfetch download utils""" -from __future__ import annotations - from logging import getLogger from time import perf_counter -from typing import TYPE_CHECKING from requests import Response, Session from requests.adapters import HTTPAdapter @@ -15,9 +12,7 @@ from urllib3 import Retry from .errors import FetcherException - -if TYPE_CHECKING: - from .path import PathArg +from .path import PathArg HTTP_ADAPTER = HTTPAdapter( max_retries=Retry( diff --git a/src/fuzzfetch/path.py b/src/fuzzfetch/path.py index e1e3e3a2..3e625329 100644 --- a/src/fuzzfetch/path.py +++ b/src/fuzzfetch/path.py @@ -6,14 +6,15 @@ import os import stat import sys +from collections.abc import Callable from pathlib import Path -from typing import Any, Callable, Union +from typing import Any if sys.platform.startswith("win"): import _winapi # pylint: disable=import-error -PathArg = Union[str, Path] +PathArg = Path | str def onerror(func: Callable[[PathArg], None], path: PathArg, _exc_info: Any) -> None: diff --git a/tox.ini b/tox.ini index 4b180a78..476f0dc2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{39,310,311,312,313},lint +envlist = py{310,311,312,313,314},lint minversion = 3.2 skip_missing_interpreters = true tox_pip_extensions_ext_venv_update = true @@ -31,6 +31,8 @@ commands = deps = codecov-cli coverage[toml] +setenv = + PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 skip_install = true [testenv:lint] @@ -44,14 +46,14 @@ skip_install = true commands = mypy --install-types --non-interactive {posargs} deps = - mypy==v1.16.0 + mypy==v1.18.2 usedevelop = true [testenv:pylint] commands = pylint {posargs} deps = - pylint==3.3.7 + pylint==4.0.2 usedevelop = true [testenv:pypi]