-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump botocore requirement to 1.34.0 (#2206)
SUMMARY 1.34 was released Nov 2023, 1.35 was released Aug 2024 Also fixes up the running the unit tests under tox. ISSUE TYPE Feature Pull Request COMPONENT NAME requirements.txt ADDITIONAL INFORMATION See also: ansible-collections/amazon.aws#2426 Reviewed-by: Mandar Kulkarni <mandar242@gmail.com>
- Loading branch information
Showing
8 changed files
with
171 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
major_changes: | ||
- community.aws collection - The community.aws collection has dropped support for | ||
``botocore<1.34.0`` and ``boto3<1.34.0``. Most modules will continue to work | ||
with older versions of the AWS SDK, however compatibility with older versions | ||
of the SDK is not guaranteed and will not be tested. When using older versions | ||
of the SDK a warning will be emitted by Ansible (https://github.com/ansible-collections/amazon.aws/pull/2426). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
# Specifically run tests against the oldest versions that we support | ||
botocore==1.31.0 | ||
boto3==1.28.0 | ||
botocore==1.34.0 | ||
boto3==1.34.0 | ||
|
||
# AWS CLI has `botocore==` dependencies, provide the one that matches botocore | ||
# to avoid needing to download over a years worth of awscli wheels. | ||
awscli==1.29.0 | ||
|
||
# AWS CLI depends on PyYAML <5.5,>=3.10; the latest PyYAML release in that range, 5.4.1, fails to install. | ||
# Use a version in that range that is known to work (https://github.com/yaml/pyyaml/issues/736) | ||
PyYAML==5.3.1 | ||
awscli==1.32.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Specifically run tests against the oldest versions that we support | ||
botocore==1.31.0 | ||
boto3==1.28.0 | ||
botocore==1.34.0 | ||
boto3==1.34.0 | ||
|
||
# AWS CLI has `botocore==` dependencies, provide the one that matches botocore | ||
# to avoid needing to download over a years worth of awscli wheels. | ||
awscli==1.29.0 | ||
awscli==1.32.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,205 @@ | ||
# It would be nice to merge this into pyproject.toml, unfortunately as of 4.23.2 they don't support generative environments when using TOML | ||
|
||
[tox] | ||
skipsdist = True | ||
envlist = clean,ansible{2.12,2.13}-py{38,39,310}-{with_constraints,without_constraints},linters | ||
# Tox4 supports labels which allow us to group the environments rather than dumping all commands into a single environment | ||
labels = | ||
format = flynt, black, isort | ||
lint = complexity-report, ansible-lint, black-lint, isort-lint, flake8-lint, flynt-lint | ||
units = ansible{2.12,2.13}-py{38,39,310}-{with_constraints,without_constraints} | ||
skip_missing_interpreters = True | ||
envlist = | ||
clean | ||
ansible{2.15}-py{39,310,311}-{with_constraints,without_constraints} | ||
ansible{2.16,2.17}-py{310,311,312}-{with_constraints,without_constraints} | ||
ansible{2.18}-py{311,312,313}-{with_constraints,without_constraints} | ||
linters | ||
|
||
[common] | ||
format_dirs = {toxinidir}/plugins {toxinidir}/tests | ||
lint_dirs = {toxinidir}/plugins | ||
ansible_desc = | ||
ansible2.15: Ansible-core 2.15 | ||
ansible2.16: Ansible-core 2.16 | ||
ansible2.17: Ansible-core 2.17 | ||
ansible2.18: Ansible-core 2.18 | ||
const_desc = | ||
with_constraints: (With boto3/botocore constraints) | ||
collection_path = ansible_collections/community/aws | ||
collection_name = community.aws | ||
[mypy] | ||
mypy_path = {envtmpdir}/mypy | ||
full_tmp_path = {[mypy]mypy_path}/{[common]collection_path} | ||
[pyright] | ||
pyright_path = {envtmpdir}/pyright | ||
full_tmp_path = {[mypy]pyright_path}/{[common]collection_path} | ||
[ansible-sanity] | ||
sanity_tmp_path = {envtmpdir}/ansible-sanity | ||
full_tmp_path = {[ansible-sanity]sanity_tmp_path}/{[common]collection_path} | ||
|
||
|
||
[testenv] | ||
description = Run the test-suite and generate a HTML coverage report | ||
description = Run the unit tests {[common]ansible_desc}/{base_python} {[common]const_desc} | ||
labels = unit | ||
deps = | ||
pytest | ||
pytest-cov | ||
ansible2.12: ansible-core>2.12,<2.13 | ||
ansible2.13: ansible-core>2.13,<2.14 | ||
!ansible2.12-!ansible2.13: ansible-core | ||
pytest-ansible | ||
-rtest-requirements.txt | ||
ansible2.15: ansible-core>2.15,<2.16 | ||
ansible2.16: ansible-core>2.16,<2.17 | ||
ansible2.17: ansible-core>2.17,<2.18 | ||
ansible2.18: ansible-core>2.18,<2.19 | ||
with_constraints: -rtests/unit/constraints.txt | ||
commands = pytest --cov-report html --cov plugins/callback --cov plugins/inventory --cov plugins/lookup --cov plugins/module_utils --cov plugins/modules --cov plugins/plugin_utils plugins {posargs:tests/} | ||
commands = | ||
pytest \ | ||
--cov-report html \ | ||
--cov plugins/callback \ | ||
--cov plugins/inventory \ | ||
--cov plugins/lookup \ | ||
--cov plugins/module_utils \ | ||
--cov plugins/modules \ | ||
--cov plugins/plugin_utils \ | ||
--cov plugins \ | ||
--ansible-host-pattern localhost \ | ||
{posargs:tests/} | ||
|
||
[testenv:clean] | ||
description = Remove coverage test data | ||
deps = coverage | ||
skip_install = true | ||
commands = coverage erase | ||
commands = | ||
coverage erase | ||
|
||
[testenv:complexity-report] | ||
labels = lint | ||
description = Generate a HTML complexity report in the complexity directory | ||
deps = | ||
# See: https://github.com/lordmauve/flake8-html/issues/30 | ||
flake8>=3.3.0,<5.0.0 | ||
flake8-pyproject | ||
flake8-html | ||
commands = -flake8 --select C90 --max-complexity 10 --format=html --htmldir={posargs:complexity} plugins | ||
commands = | ||
-flake8 \ | ||
--select C90 \ | ||
--max-complexity 10 \ | ||
--format=html \ | ||
--htmldir={posargs:complexity} \ | ||
{posargs:{[common]lint_dirs}} | ||
|
||
[testenv:ansible-lint] | ||
labels = lint | ||
description = Run ansible-lint | ||
deps = | ||
ansible-lint | ||
ansible-lint >= 24.7.0 | ||
commands = | ||
ansible-lint {toxinidir}/plugins | ||
ansible-lint {posargs:{[common]lint_dirs}} | ||
|
||
[testenv:black] | ||
labels = format | ||
description = Apply "black" formatting | ||
depends = | ||
flynt, isort | ||
deps = | ||
black >=23.0, <24.0 | ||
commands = | ||
black {[common]format_dirs} | ||
black {posargs:{[common]format_dirs}} | ||
|
||
[testenv:black-lint] | ||
labels = lint | ||
description = Lint against "black" formatting standards | ||
deps = | ||
{[testenv:black]deps} | ||
commands = | ||
black -v --check --diff {[common]format_dirs} | ||
black -v --check --diff {posargs:{[common]format_dirs}} | ||
|
||
[testenv:isort] | ||
labels = format | ||
description = Sort imports | ||
deps = | ||
isort | ||
commands = | ||
isort {[common]format_dirs} | ||
isort {posargs:{[common]format_dirs}} | ||
|
||
[testenv:isort-lint] | ||
labels = lint | ||
description = Lint for import sorting | ||
deps = | ||
{[testenv:isort]deps} | ||
commands = | ||
isort --check-only --diff {[common]format_dirs} | ||
|
||
[testenv:flake8-lint] | ||
deps = | ||
flake8 | ||
commands = | ||
flake8 {posargs} {[common]format_dirs} | ||
isort --check-only --diff {posargs:{[common]format_dirs}} | ||
|
||
[testenv:flynt] | ||
labels = format | ||
description = Apply flint (f-string) formatting | ||
deps = | ||
flynt | ||
commands = | ||
flynt {[common]format_dirs} | ||
flynt {posargs:{[common]format_dirs}} | ||
|
||
[testenv:flynt-lint] | ||
labels = lint | ||
description = Run flint (f-string) linting | ||
deps = | ||
flynt | ||
commands = | ||
flynt --dry-run {[common]format_dirs} | ||
flynt --dry-run --fail-on-change {posargs:{[common]format_dirs}} | ||
|
||
[testenv:linters] | ||
[testenv:flake8-lint] | ||
labels = lint | ||
description = Run FLAKE8 linting | ||
deps = | ||
{[testenv:black]deps} | ||
{[testenv:isort]deps} | ||
flake8 | ||
flake8-pyproject | ||
commands = | ||
flake8 {posargs:{[common]format_dirs}} | ||
|
||
[testenv:pylint-lint] | ||
labels = future-lint | ||
description = Run pylint tests that are disabled by the default Ansible sanity tests | ||
deps = | ||
pylint | ||
commands = | ||
pylint \ | ||
--disable R,C,W,E \ | ||
--enable consider-using-dict-items,assignment-from-no-return,no-else-continue,no-else-break,simplifiable-if-statement,pointless-string-statement,redefined-outer-name,redefined-builtin \ | ||
{posargs:{[common]lint_dirs}} | ||
|
||
[testenv:ansible-sanity] | ||
allowlist_externals = echo,cd,rm,mkdir,ln,ls | ||
labels = future-lint | ||
description = Run latest Ansible sanity tests | ||
# ansible-sanity expects us to be installed into ansible_collections/community/aws | ||
# by default we're checked out into community.aws | ||
commands_pre = | ||
rm -rf {[ansible-sanity]sanity_tmp_path} | ||
mkdir -p {[ansible-sanity]full_tmp_path} | ||
rm -d {[ansible-sanity]full_tmp_path} | ||
ln -s {toxinidir} {[ansible-sanity]full_tmp_path} | ||
deps = | ||
git+https://github.com/ansible/ansible.git@devel | ||
shellcheck-py | ||
commands = | ||
cd {[ansible-sanity]full_tmp_path} | ||
ansible-test sanity | ||
|
||
[testenv:mypy-lint] | ||
allowlist_externals = echo,cd,rm,mkdir,ln | ||
labels = future-lint | ||
description = Run mypi type tests | ||
set_env = | ||
MYPYPATH={envtmpdir}/mypy | ||
deps = | ||
mypy | ||
# ansible-core | ||
git+https://github.com/ansible/ansible.git@devel | ||
botocore | ||
boto3 | ||
placebo | ||
typing_extensions | ||
commands_pre = | ||
rm -rf {[mypy]mypy_path} | ||
mkdir -p {[mypy]full_tmp_path} | ||
rm -d {[mypy]full_tmp_path} | ||
ln -s {toxinidir} {[mypy]full_tmp_path} | ||
ansible-galaxy collection install -p {[mypy]mypy_path}/ansible_collections git+https://github.com/ansible-collections/amazon.aws.git,main | ||
commands = | ||
black -v --check {toxinidir}/plugins {toxinidir}/tests | ||
isort --check-only --diff {toxinidir}/plugins {toxinidir}/tests | ||
flake8 {posargs} {toxinidir}/plugins {toxinidir}/tests | ||
|
||
[flake8] | ||
# E123, E125 skipped as they are invalid PEP-8. | ||
show-source = True | ||
ignore = E123,E125,E203,E402,E501,E741,F401,F811,F841,W503 | ||
max-line-length = 160 | ||
builtins = _ | ||
cd {[mypy]full_tmp_path} | ||
mypy \ | ||
--namespace-packages --explicit-package-bases \ | ||
--follow-imports silent \ | ||
{posargs:plugins/module_utils} | ||
# start with module_utils, expand later |