diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 662e827..37ee308 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] os: [ubuntu-latest] diff --git a/.github/workflows/flake8_py_version_check.yml b/.github/workflows/flake8_py_version_check.yml index f670e2a..af5a52d 100644 --- a/.github/workflows/flake8_py_version_check.yml +++ b/.github/workflows/flake8_py_version_check.yml @@ -9,10 +9,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - name: Set up Python 3.12 + - name: Set up Python3 uses: actions/setup-python@v6 with: - python-version: 3.12 allow-prereleases: true - name: run script run: python scripts/flake8_py_version_check.py diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 4e05c6f..fa5421e 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -80,7 +80,7 @@ You can also use [tox](https://tox.wiki/en/latest/index.html) to test with multi ```console /path/to/venv/bin/tox ``` -will by default run all tests on python versions 3.9 through 3.13. If you only want to test a specific version you can specify the environment with `-e` +will by default run all tests on python versions 3.10 through 3.14. If you only want to test a specific version you can specify the environment with `-e` ```console /path/to/venv/bin/tox -e py313 diff --git a/pyproject.toml b/pyproject.toml index 01a0bc6..cda0a37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,16 +26,16 @@ 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", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Quality Assurance", ] -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = ["flake8>=7.2.0", "attrs>=22.2.0"] dynamic = ["version"] diff --git a/tests/eval_files/b912_py314.py b/tests/eval_files/b912_py314.py index ee35a5d..6e8f423 100644 --- a/tests/eval_files/b912_py314.py +++ b/tests/eval_files/b912_py314.py @@ -1,6 +1,6 @@ map(lambda x: x, "a", "b") # B912: 0 map(lambda x: x, "a", "b", *map("c")) # B912: 0 -map(lambda x: x, "a", map(lambda x: x, "a"), strict=True) # B912: 22 +map(lambda x: x, "a", map(lambda x: x, "a"), strict=True) map() map(lambda x: x, "a") diff --git a/tests/test_bugbear.py b/tests/test_bugbear.py index 04835cf..58c35e2 100644 --- a/tests/test_bugbear.py +++ b/tests/test_bugbear.py @@ -8,6 +8,7 @@ import subprocess import sys import unittest +import warnings from argparse import Namespace from pathlib import Path @@ -54,7 +55,14 @@ def test_eval( ] bbc = BugBearChecker(filename=str(path), options=options) - errors = [e for e in bbc.run() if (test == "B950" or not e[2].startswith("B950"))] + # Suppress SyntaxWarnings for B012 tests which intentionally contain + # return/break/continue in finally blocks (SyntaxWarning in Python 3.14+) + with warnings.catch_warnings(): + if test.startswith("B012"): + warnings.filterwarnings("ignore", category=SyntaxWarning) + errors = [ + e for e in bbc.run() if (test == "B950" or not e[2].startswith("B950")) + ] errors.sort() assert errors == tuple_expected diff --git a/tox.ini b/tox.ini index 9e2d842..787c633 100644 --- a/tox.ini +++ b/tox.ini @@ -5,13 +5,11 @@ envlist = py39, py310, py311, py312, py313, pep8_naming, mypy [gh-actions] python = - 3.9: py39 3.10: py310 3.11: py311,pep8_naming 3.12: py312 3.13: py313,mypy - # blocked by https://github.com/ijl/orjson/issues/569 - # 3.14: py314 + 3.14: py314 [testenv] description = Run coverage @@ -35,7 +33,7 @@ commands = coverage run -m pytest tests/test_bugbear.py -k b902 {posargs} coverage report -m -[testenv:{py39-,py310-,py311-,py312-,py313-}mypy] +[testenv:{py310-,py311-,py312-,py313-,py314-}mypy] deps = mypy commands =