Skip to content

Commit 1543d4c

Browse files
authored
Drop support for Python 3.9 (#4009)
1 parent 26ecfa0 commit 1543d4c

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Bug report
33
about: >
44
Create a bug report. Ensure that it does reproduce on the main branch with
5-
python >=3.9. For anything else, please use the discussion link below.
5+
python >=3.10. For anything else, please use the discussion link below.
66
labels: bug, new
77
---
88

@@ -53,8 +53,8 @@ Possible security bugs should be reported via email to `security@ansible.com`
5353

5454
<!--- Describe what happened. If possible run with extra verbosity (-vvvv) -->
5555

56-
Please give some details of what is happening.
57-
Include a [minimum complete verifiable example] with:
56+
Please give some details of what is happening. Include a [minimum complete
57+
verifiable example] with:
5858

5959
- minimized playbook to reproduce the error
6060
- the output of running ansible-lint including the command line used

.github/workflows/tox.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ jobs:
2828
id: generate_matrix
2929
uses: coactions/dynamic-matrix@v1
3030
with:
31-
min_python: "3.9"
31+
min_python: "3.10"
3232
max_python: "3.12"
33+
default_python: "3.10"
3334
other_names: |
3435
lint
3536
pkg

pyproject.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77

88
[project]
99
# https://peps.python.org/pep-0621/#readme
10-
requires-python = ">=3.9"
10+
requires-python = ">=3.10"
1111
dynamic = ["version", "dependencies", "optional-dependencies"]
1212
name = "ansible-lint"
1313
description = "Checks playbooks for practices and behavior that could potentially be improved"
@@ -26,7 +26,6 @@ classifiers = [
2626
"Operating System :: POSIX",
2727
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
2828
"Programming Language :: Python :: 3",
29-
"Programming Language :: Python :: 3.9",
3029
"Programming Language :: Python :: 3.10",
3130
"Programming Language :: Python :: 3.11",
3231
"Programming Language :: Python :: 3.12",
@@ -94,7 +93,7 @@ ensure_newline_before_comments = true
9493
line_length = 88
9594

9695
[tool.mypy]
97-
python_version = 3.9
96+
python_version = "3.10"
9897
strict = true
9998
color_output = true
10099
error_summary = true
@@ -108,7 +107,7 @@ disallow_any_generics = true
108107
# site-packages is here to help vscode mypy integration getting confused
109108
exclude = "(build|dist|test/local-content|site-packages|~/.pyenv|examples/playbooks/collections|plugins/modules)"
110109
# https://github.com/python/mypy/issues/12664
111-
no_incremental = true
110+
incremental = false
112111

113112
[[tool.mypy.overrides]]
114113
module = [
@@ -167,7 +166,7 @@ score = "n"
167166

168167
[tool.pyright]
169168
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md#sample-pyprojecttoml-file
170-
pythonVersion = "3.9"
169+
pythonVersion = "3.10"
171170
include = ["src"]
172171
# https://github.com/microsoft/pyright/issues/777
173172
"stubPath" = ""

src/ansiblelint/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,10 @@ def _do_transform(result: LintResult, opts: Options) -> None:
205205

206206
def support_banner() -> None:
207207
"""Display support banner when running on unsupported platform."""
208-
if sys.version_info < (3, 9, 0): # pragma: no cover # noqa: UP036
208+
if sys.version_info < (3, 10, 0): # pragma: no cover
209209
prefix = "::warning::" if "GITHUB_ACTION" in os.environ else "WARNING: "
210210
console_stderr.print(
211-
f"{prefix}ansible-lint is no longer tested under Python {sys.version_info.major}.{sys.version_info.minor} and will soon require 3.9. Do not report bugs for this version.",
211+
f"{prefix}ansible-lint is no longer tested under Python {sys.version_info.major}.{sys.version_info.minor} and will soon require 3.10. Do not report bugs for this version.",
212212
style="bold red",
213213
)
214214

src/ansiblelint/schemas/__store__.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"url": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible-lint-config.json"
55
},
66
"ansible-navigator-config": {
7-
"etag": "815582d2c4b252906bf83d1da9667dedf16dbd9b6149cfceea205c4848c78f53",
7+
"etag": "dba7cc2f4b1905e26673c66e15f01de8f9c7899da944d9a54ba6e684e27bd5d5",
88
"url": "https://raw.githubusercontent.com/ansible/ansible-navigator/main/src/ansible_navigator/data/ansible-navigator.json"
99
},
1010
"changelog": {

src/ansiblelint/schemas/ansible-navigator-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"additionalProperties": false,
1111
"properties": {
1212
"cmdline": {
13-
"description": "Extra parameters passed to the corresponding command",
13+
"description": "Extra parameters passed to the underlying ansible command (e.g. ansible-playbook, ansible-doc, etc)",
1414
"type": "string"
1515
},
1616
"config": {

test/test_schemas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def test_spdx() -> None:
101101
)
102102
else:
103103
warnings.warn(
104-
"test_spdx failure was ignored because constraints were not pinned (PIP_CONSTRAINTS). This is expected for py39 and py-devel jobs.",
104+
"test_spdx failure was ignored because constraints were not pinned (PIP_CONSTRAINTS). This is expected for py310 and py-devel jobs.",
105105
category=pytest.PytestWarning,
106106
stacklevel=1,
107107
)

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ setenv =
6666
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
6767
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
6868
PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt
69-
devel,pkg,pre,py39: PIP_CONSTRAINT = /dev/null
69+
devel,pkg,pre,py310: PIP_CONSTRAINT = /dev/null
7070
PIP_DISABLE_PIP_VERSION_CHECK = 1
7171
PRE_COMMIT_COLOR = always
7272
FORCE_COLOR = 1

0 commit comments

Comments
 (0)