Skip to content

Commit

Permalink
Remove support for py36 and py37
Browse files Browse the repository at this point in the history
As part of reduce testing complexy and getting ansible-lint in sync
with  ansible-core, we drop support for older python versions.

This change marks the start of `6.x` and once is merged we will
create a `stable/5.x` for the last comment before it. That branch
will be used to backport changes needed for the older versions, at
least until we can make a full release of 6.x.

One additional reason for making this move is a recent explosion
of dropping support for py36 and sometimes even py37 on other
dependencies, such pytest, coverage, pip-compile, tomli.
  • Loading branch information
ssbarnea committed Feb 5, 2022
1 parent 3a86d06 commit 398c0f9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 25 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ jobs:
matrix:
python-version:
# keep list sorted as it determines UI order too
- 3.6
- 3.7
- 3.8
- 3.9
- "3.10"
Expand All @@ -119,16 +117,10 @@ jobs:
# - windows-latest
# - windows-2016
include:
- tox_env: py36
os: ubuntu-20.04
python-version: 3.6
- name: py39 (wsl)
tox_env: py39
os: windows-latest
shell: "wsl-bash {0}"
- tox_env: py37
os: ubuntu-20.04
python-version: 3.7
- tox_env: py38
os: ubuntu-20.04
python-version: 3.8
Expand All @@ -141,14 +133,12 @@ jobs:
os: ubuntu-20.04
python-version: "3.10"
devel: true
skip_ansible29: true
- tox_env: py36
- tox_env: py38
os: macOS-latest
python-version: 3.6
python-version: 3.8
- tox_env: py310
os: macOS-latest
python-version: "3.10"
skip_ansible29: true

env:
TOX_PARALLEL_NO_SPINNER: 1
Expand Down Expand Up @@ -206,19 +196,13 @@ jobs:
--skip-missing-interpreters false
-vv
env:
TOXENV: ${{ matrix.tox_env }}-core,${{ matrix.tox_env }}-ansible29
TOXENV: ${{ matrix.tox_env }}-core
# sequential run improves browsing experience (almost no speed impact)
- name: "Test with tox: ${{ matrix.tox_env }}-core"
run: |
python3 -m tox
env:
TOXENV: ${{ matrix.tox_env }}-core
- name: "Test with tox: ${{ matrix.tox_env }}-ansible29"
if: ${{ !matrix.skip_ansible29 }}
run: |
python3 -m tox
env:
TOXENV: ${{ matrix.tox_env }}-ansible29
- name: "Test with tox: ${{ matrix.tox_env }}-devel"
if: ${{ matrix.devel }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ to create a new rule by following the steps below:
* If the rule is task specific, it may be best to include a test to verify its
use inside blocks as well.
* Optionally run only the rule specific tests with a command like:
:command:`tox -e py38-ansible29 -- -k NewRule`
:command:`tox -e py38 -- -k NewRule`
* Run :command:`tox` in order to run all ansible-lint tests. Adding a new rule
can break some other tests. Update them if needed.
* Run :command:`ansible-lint -L` and check that the rule description renders
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ keywords =

[options]
use_scm_version = True
python_requires = >=3.6
python_requires = >=3.8
package_dir =
= src
packages = find:
Expand Down
6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ envlist =
lint
packaging
py310-{core,devel}
py{39,38}-{core,ansible29,devel}
py{37,36}-{core,ansible29}
py{39,38}-{core,devel}
py{37,36}-core
isolated_build = true
requires =
setuptools >= 41.4.0
Expand All @@ -16,12 +16,10 @@ skip_missing_interpreters = True
description =
Run the tests under {basepython} and
devel: ansible devel branch
ansible29: ansible 2.9
core: ansible-core 2.11+
deps =
--editable .[yamllint,test]
core: ansible-core
ansible29: ansible>=2.9,<2.10
py: ansible-core>=2.11
devel: ansible-core @ git+https://github.com/ansible/ansible.git # GPLv3+
commands =
Expand Down

0 comments on commit 398c0f9

Please sign in to comment.