-
Notifications
You must be signed in to change notification settings - Fork 111
Drop 3.9 support + add 3.14 CI #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR drops support for Python 3.9 and adds Python 3.14 to the CI pipeline, aligning with flake8's supported versions.
- Removed Python 3.9 from all configuration files and CI workflows
- Added Python 3.14 support to tox, pyproject.toml, and CI
- Updated documentation to reflect the new minimum Python version (3.10)
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tox.ini | Removed py39 from envlist and gh-actions mapping; added py314 support |
| pyproject.toml | Updated Python version classifiers and minimum required version to 3.10 |
| DEVELOPMENT.md | Updated documentation to reflect Python 3.10 as the new minimum version |
| .github/workflows/flake8_py_version_check.yml | Removed hardcoded Python 3.12 version to allow flexibility |
| .github/workflows/ci.yml | Updated CI matrix to test Python 3.10-3.14 instead of 3.9-3.13 |
Comments suppressed due to low confidence (1)
tox.ini:4
- The envlist still includes py39 but Python 3.9 support has been dropped. Remove py39 from this list to match the gh-actions configuration and project requirements.
envlist = py39, py310, py311, py312, py313, pep8_naming, mypy
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
DEVELOPMENT.md
Outdated
| /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.13. If you only want to test a specific version you can specify the environment with `-e` |
Copilot
AI
Oct 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation states tests run on Python 3.10 through 3.13, but Python 3.14 support has been added. Update to '3.10 through 3.14' to reflect the current configuration.
| will by default run all tests on python versions 3.10 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` |
- Update pyproject.toml etc. - Add to CI runs - Drop 3.9 as flake8 itself did - Remove expected error in b912_py314.py ... Can we double check that makes sense ... Test: - Run tox in 3.14 - `python3 -m venv /tmp/tf --upgrade-deps` - `/tmp/tf/bin/pip install tox` - `/tmp/tf/bin/tox -e py314` - Repeat in 3.13
| 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kasium - This makes sense right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, seems like a mistake I did
|
Seems we have new warnings to fix too: diff --git a/tests/test_bugbear.py b/tests/test_bugbear.py
index 04835cf..1e34616 100644
--- a/tests/test_bugbear.py
+++ b/tests/test_bugbear.py
@@ -8,6 +8,7 @@ import site
import subprocess
import sys
import unittest
+import warnings
from argparse import Namespace
from pathlib import Path
@@ -54,7 +55,12 @@ 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
|
Catching this in linters is still going to be helpful; the SyntaxWarning has some practical issues that make it not work as well as it ideally should. |
|
Ok, should we just suppress the warnings in the testing code or leave them? |
|
I'd suppress them. |
Test:
python3 -m venv /tmp/tf --upgrade-deps/tmp/tf/bin/pip install tox/tmp/tf/bin/tox -e py314