diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b1273da..752288b 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -8,21 +8,21 @@ jobs: fail-fast: false matrix: include: - - python-version: 3.13 + - python-version: 3.14 env: TOXENV: pylint - - python-version: 3.13 + - python-version: 3.14 env: TOXENV: typing - - python-version: 3.13 + - python-version: 3.14 env: TOXENV: twinecheck steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} @@ -36,5 +36,5 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a793287..6794598 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,12 +15,12 @@ jobs: id-token: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: 3.13 + python-version: 3.14 - name: Build run: | diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 19623f3..5df0bae 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -7,13 +7,13 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-rc.1"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/tests-ubuntu.yml b/.github/workflows/tests-ubuntu.yml index a41251c..b7dd3c6 100644 --- a/.github/workflows/tests-ubuntu.yml +++ b/.github/workflows/tests-ubuntu.yml @@ -8,9 +8,6 @@ jobs: fail-fast: false matrix: include: - - python-version: "3.9" - env: - TOXENV: py - python-version: "3.10" env: TOXENV: py @@ -23,21 +20,18 @@ jobs: - python-version: "3.13" env: TOXENV: py - - python-version: "3.14.0-rc.1" + - python-version: "3.14" env: TOXENV: py - - python-version: pypy3.10 - env: - TOXENV: pypy - python-version: pypy3.11 env: TOXENV: pypy steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index e4dd7cc..e80f4f5 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -7,13 +7,13 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-rc.1"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 189c0ec..a4aae43 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.5 + 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: end-of-file-fixer - id: trailing-whitespace diff --git a/README.rst b/README.rst index 87a0d3b..0c9647f 100644 --- a/README.rst +++ b/README.rst @@ -24,7 +24,7 @@ sorted by priority and queues that are emptied in a round-robin_ fashion. .. note:: Queuelib collections are not thread-safe. -Queuelib supports Python 3.9+ and has no dependencies. +Queuelib supports Python 3.10+ and has no dependencies. .. _queues: https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics) .. _round-robin: https://en.wikipedia.org/wiki/Round-robin_scheduling diff --git a/pyproject.toml b/pyproject.toml index 5801ccd..cb93d5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,6 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -23,7 +22,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] -requires-python = ">=3.9" +requires-python = ">=3.10" dynamic = ["version"] [project.urls] @@ -57,10 +56,8 @@ omit = [ "queuelib/tests/*", ] -[tool.coverage.report] -exclude_also = [ - "if TYPE_CHECKING:", -] +[tool.mypy] +strict = true [[tool.mypy.overrides]] module = "queuelib.tests.*" diff --git a/queuelib/pqueue.py b/queuelib/pqueue.py index b413fd3..5a6b074 100644 --- a/queuelib/pqueue.py +++ b/queuelib/pqueue.py @@ -1,9 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Callable +from typing import TYPE_CHECKING, Any if TYPE_CHECKING: - from collections.abc import Iterable + from collections.abc import Callable, Iterable from queuelib.queue import BaseQueue diff --git a/queuelib/rrqueue.py b/queuelib/rrqueue.py index 468f4fc..f4774f3 100644 --- a/queuelib/rrqueue.py +++ b/queuelib/rrqueue.py @@ -1,10 +1,10 @@ from __future__ import annotations from collections import deque -from typing import TYPE_CHECKING, Any, Callable +from typing import TYPE_CHECKING, Any if TYPE_CHECKING: - from collections.abc import Hashable, Iterable + from collections.abc import Callable, Hashable, Iterable from queuelib.queue import BaseQueue diff --git a/tox.ini b/tox.ini index 54cf4a4..6947b0d 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ envlist = py, pylint, typing, twinecheck, pre-commit [testenv] deps = pytest - pytest-cov + pytest-cov >= 7.0.0 commands = py.test --cov=queuelib --cov-report=xml --cov-report=term --cov-report=html {posargs:queuelib} @@ -17,23 +17,23 @@ commands = basepython = python3 deps = {[testenv]deps} - pylint==3.3.7 + pylint==4.0.2 commands = pylint {posargs:queuelib} [testenv:typing] basepython = python3 deps = - mypy==1.17.0 + mypy==1.18.2 pytest==8.4.1 commands = - mypy --strict {posargs:queuelib} + mypy {posargs:queuelib} [testenv:twinecheck] basepython = python3 deps = - twine==6.1.0 - build==1.2.2.post1 + twine==6.2.0 + build==1.3.0 commands = python -m build --sdist twine check dist/*