Skip to content

Commit

Permalink
Drop support for Python 3.9 (#4009)
Browse files Browse the repository at this point in the history
  • Loading branch information
audgirka authored Feb 6, 2024
1 parent 26ecfa0 commit 1543d4c
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: >
Create a bug report. Ensure that it does reproduce on the main branch with
python >=3.9. For anything else, please use the discussion link below.
python >=3.10. For anything else, please use the discussion link below.
labels: bug, new
---

Expand Down Expand Up @@ -53,8 +53,8 @@ Possible security bugs should be reported via email to `[email protected]`

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

Please give some details of what is happening.
Include a [minimum complete verifiable example] with:
Please give some details of what is happening. Include a [minimum complete
verifiable example] with:

- minimized playbook to reproduce the error
- the output of running ansible-lint including the command line used
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ jobs:
id: generate_matrix
uses: coactions/dynamic-matrix@v1
with:
min_python: "3.9"
min_python: "3.10"
max_python: "3.12"
default_python: "3.10"
other_names: |
lint
pkg
Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

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

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

[[tool.mypy.overrides]]
module = [
Expand Down Expand Up @@ -167,7 +166,7 @@ score = "n"

[tool.pyright]
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md#sample-pyprojecttoml-file
pythonVersion = "3.9"
pythonVersion = "3.10"
include = ["src"]
# https://github.com/microsoft/pyright/issues/777
"stubPath" = ""
Expand Down
4 changes: 2 additions & 2 deletions src/ansiblelint/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ def _do_transform(result: LintResult, opts: Options) -> None:

def support_banner() -> None:
"""Display support banner when running on unsupported platform."""
if sys.version_info < (3, 9, 0): # pragma: no cover # noqa: UP036
if sys.version_info < (3, 10, 0): # pragma: no cover
prefix = "::warning::" if "GITHUB_ACTION" in os.environ else "WARNING: "
console_stderr.print(
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.",
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.",
style="bold red",
)

Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/schemas/__store__.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"url": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible-lint-config.json"
},
"ansible-navigator-config": {
"etag": "815582d2c4b252906bf83d1da9667dedf16dbd9b6149cfceea205c4848c78f53",
"etag": "dba7cc2f4b1905e26673c66e15f01de8f9c7899da944d9a54ba6e684e27bd5d5",
"url": "https://raw.githubusercontent.com/ansible/ansible-navigator/main/src/ansible_navigator/data/ansible-navigator.json"
},
"changelog": {
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/schemas/ansible-navigator-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"additionalProperties": false,
"properties": {
"cmdline": {
"description": "Extra parameters passed to the corresponding command",
"description": "Extra parameters passed to the underlying ansible command (e.g. ansible-playbook, ansible-doc, etc)",
"type": "string"
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion test/test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_spdx() -> None:
)
else:
warnings.warn(
"test_spdx failure was ignored because constraints were not pinned (PIP_CONSTRAINTS). This is expected for py39 and py-devel jobs.",
"test_spdx failure was ignored because constraints were not pinned (PIP_CONSTRAINTS). This is expected for py310 and py-devel jobs.",
category=pytest.PytestWarning,
stacklevel=1,
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt
devel,pkg,pre,py39: PIP_CONSTRAINT = /dev/null
devel,pkg,pre,py310: PIP_CONSTRAINT = /dev/null
PIP_DISABLE_PIP_VERSION_CHECK = 1
PRE_COMMIT_COLOR = always
FORCE_COLOR = 1
Expand Down

0 comments on commit 1543d4c

Please sign in to comment.