diff --git a/changelogs/fragments/ansible-test-sanity-requirements.yml b/changelogs/fragments/ansible-test-sanity-requirements.yml new file mode 100644 index 00000000000..9ed05f794c7 --- /dev/null +++ b/changelogs/fragments/ansible-test-sanity-requirements.yml @@ -0,0 +1,2 @@ +minor_changes: + - ansible-test - Update pinned sanity test requirements. diff --git a/lib/ansible/_internal/_templating/_engine.py b/lib/ansible/_internal/_templating/_engine.py index de3d70e38d1..4beb1806291 100644 --- a/lib/ansible/_internal/_templating/_engine.py +++ b/lib/ansible/_internal/_templating/_engine.py @@ -194,7 +194,7 @@ class TemplateEngine: return self._variables @available_variables.setter - def available_variables(self, variables: dict[str, t.Any]) -> None: + def available_variables(self, variables: dict[str, t.Any] | ChainMap[str, t.Any]) -> None: self._variables = variables def resolve_variable_expression( diff --git a/lib/ansible/utils/collection_loader/_collection_finder.py b/lib/ansible/utils/collection_loader/_collection_finder.py index 961fcef546f..27320806957 100644 --- a/lib/ansible/utils/collection_loader/_collection_finder.py +++ b/lib/ansible/utils/collection_loader/_collection_finder.py @@ -34,7 +34,8 @@ except ImportError: # Used with Python 3.9 and 3.10 only # This member is still available as an alias up until Python 3.14 but # is deprecated as of Python 3.12. - from importlib.abc import TraversableResources # deprecated: description='TraversableResources move' python_version='3.10' + # deprecated: description='TraversableResources move' python_version='3.10' + from importlib.abc import TraversableResources # type: ignore[assignment,no-redef] # NB: this supports import sanity test providing a different impl try: diff --git a/test/lib/ansible_test/_data/requirements/sanity.changelog.txt b/test/lib/ansible_test/_data/requirements/sanity.changelog.txt index 368734b8940..8a7226bee8f 100644 --- a/test/lib/ansible_test/_data/requirements/sanity.changelog.txt +++ b/test/lib/ansible_test/_data/requirements/sanity.changelog.txt @@ -6,4 +6,4 @@ PyYAML==6.0.2 rstcheck==5.0.0 semantic-version==2.10.0 types-docutils==0.18.3 -typing_extensions==4.13.2 +typing_extensions==4.14.1 diff --git a/test/lib/ansible_test/_data/requirements/sanity.pep8.txt b/test/lib/ansible_test/_data/requirements/sanity.pep8.txt index 0d62b8f0610..b950209d6ab 100644 --- a/test/lib/ansible_test/_data/requirements/sanity.pep8.txt +++ b/test/lib/ansible_test/_data/requirements/sanity.pep8.txt @@ -1,2 +1,2 @@ # edit "sanity.pep8.in" and generate with: hacking/update-sanity-requirements.py --test pep8 -pycodestyle==2.13.0 +pycodestyle==2.14.0 diff --git a/test/lib/ansible_test/_data/requirements/sanity.pylint.txt b/test/lib/ansible_test/_data/requirements/sanity.pylint.txt index f8daebf3804..bf28bb62b59 100644 --- a/test/lib/ansible_test/_data/requirements/sanity.pylint.txt +++ b/test/lib/ansible_test/_data/requirements/sanity.pylint.txt @@ -1,9 +1,9 @@ # edit "sanity.pylint.in" and generate with: hacking/update-sanity-requirements.py --test pylint -astroid==3.3.10 +astroid==3.3.11 dill==0.4.0 isort==6.0.1 mccabe==0.7.0 platformdirs==4.3.8 pylint==3.3.7 PyYAML==6.0.2 -tomlkit==0.13.2 +tomlkit==0.13.3 diff --git a/test/lib/ansible_test/_internal/commands/integration/__init__.py b/test/lib/ansible_test/_internal/commands/integration/__init__.py index 19d513c9da1..029164d65c9 100644 --- a/test/lib/ansible_test/_internal/commands/integration/__init__.py +++ b/test/lib/ansible_test/_internal/commands/integration/__init__.py @@ -331,7 +331,7 @@ def integration_test_environment( display.info('Copying %s/ to %s/' % (dir_src, dir_dst), verbosity=2) if not args.explain: - shutil.copytree(to_bytes(dir_src), to_bytes(dir_dst), symlinks=True) # type: ignore[arg-type] # incorrect type stub omits bytes path support + shutil.copytree(to_bytes(dir_src), to_bytes(dir_dst), symlinks=True) # type: ignore[type-var,arg-type] # type stub omits bytes path support for file_src, file_dst in file_copies: display.info('Copying %s to %s' % (file_src, file_dst), verbosity=2) diff --git a/test/sanity/code-smell/black.requirements.txt b/test/sanity/code-smell/black.requirements.txt index ad9b228f2f2..ffb59dd6b3a 100644 --- a/test/sanity/code-smell/black.requirements.txt +++ b/test/sanity/code-smell/black.requirements.txt @@ -1,6 +1,6 @@ # edit "black.requirements.in" and generate with: hacking/update-sanity-requirements.py --test black black==25.1.0 -click==8.2.0 +click==8.2.1 mypy_extensions==1.1.0 packaging==25.0 pathspec==0.12.1 diff --git a/test/sanity/code-smell/mypy.requirements.txt b/test/sanity/code-smell/mypy.requirements.txt index 22d69830fbc..fd91a7b5352 100644 --- a/test/sanity/code-smell/mypy.requirements.txt +++ b/test/sanity/code-smell/mypy.requirements.txt @@ -1,22 +1,24 @@ # edit "mypy.requirements.in" and generate with: hacking/update-sanity-requirements.py --test mypy cffi==1.17.1 -cryptography==44.0.3 +cryptography==45.0.5 iniconfig==2.1.0 Jinja2==3.1.6 MarkupSafe==3.0.2 -mypy==1.15.0 +mypy==1.17.0 mypy_extensions==1.1.0 packaging==25.0 -pluggy==1.5.0 +pathspec==0.12.1 +pluggy==1.6.0 pycparser==2.22 -pytest==8.3.5 -pytest-mock==3.14.0 +Pygments==2.19.2 +pytest==8.4.1 +pytest-mock==3.14.1 tomli==2.2.1 types-backports==0.1.3 -types-paramiko==3.5.0.20240928 -types-PyYAML==6.0.12.20250402 -types-requests==2.32.0.20250328 -types-setuptools==80.4.0.20250511 +types-paramiko==3.5.0.20250708 +types-PyYAML==6.0.12.20250516 +types-requests==2.32.4.20250611 +types-setuptools==80.9.0.20250529 types-toml==0.10.8.20240310 -typing_extensions==4.13.2 -urllib3==2.4.0 +typing_extensions==4.14.1 +urllib3==2.5.0 diff --git a/test/sanity/code-smell/mypy/ansible-core.ini b/test/sanity/code-smell/mypy/ansible-core.ini index ae51059471b..7703e800387 100644 --- a/test/sanity/code-smell/mypy/ansible-core.ini +++ b/test/sanity/code-smell/mypy/ansible-core.ini @@ -26,6 +26,9 @@ ignore_missing_imports = True [mypy-ansible.module_utils.six.moves.*] ignore_missing_imports = True +[mypy-pkg_resources.*] +ignore_missing_imports = True + [mypy-coverage.*] ignore_missing_imports = True diff --git a/test/sanity/code-smell/pymarkdown.requirements.txt b/test/sanity/code-smell/pymarkdown.requirements.txt index 88497f3d0fa..3062b71ad06 100644 --- a/test/sanity/code-smell/pymarkdown.requirements.txt +++ b/test/sanity/code-smell/pymarkdown.requirements.txt @@ -1,9 +1,10 @@ # edit "pymarkdown.requirements.in" and generate with: hacking/update-sanity-requirements.py --test pymarkdown -application_properties==0.8.2 +application_properties==0.9.0 Columnar==1.4.1 -pymarkdownlnt==0.9.29 +pyjson5==1.6.9 +pymarkdownlnt==0.9.31 PyYAML==6.0.2 tomli==2.2.1 toolz==1.0.0 -typing_extensions==4.13.2 +typing_extensions==4.14.1 wcwidth==0.2.13 diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index dae96e59468..f2dd0a3f405 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -169,7 +169,6 @@ test/units/module_utils/facts/test_facts.py mypy-3.13:assignment test/units/modules/mount_facts_data.py mypy-3.13:arg-type test/units/modules/test_apt.py mypy-3.13:name-match test/units/modules/test_mount_facts.py mypy-3.13:index -test/units/playbook/test_base.py mypy-3.13:assignment test/units/module_utils/basic/test_exit_json.py mypy-3.12:assignment test/units/module_utils/basic/test_exit_json.py mypy-3.12:misc test/units/module_utils/facts/other/test_facter.py mypy-3.12:assignment @@ -180,7 +179,6 @@ test/units/module_utils/facts/test_facts.py mypy-3.12:assignment test/units/modules/mount_facts_data.py mypy-3.12:arg-type test/units/modules/test_apt.py mypy-3.12:name-match test/units/modules/test_mount_facts.py mypy-3.12:index -test/units/playbook/test_base.py mypy-3.12:assignment test/units/module_utils/basic/test_exit_json.py mypy-3.11:assignment test/units/module_utils/basic/test_exit_json.py mypy-3.11:misc test/units/module_utils/facts/other/test_facter.py mypy-3.11:assignment @@ -191,7 +189,6 @@ test/units/module_utils/facts/test_facts.py mypy-3.11:assignment test/units/modules/mount_facts_data.py mypy-3.11:arg-type test/units/modules/test_apt.py mypy-3.11:name-match test/units/modules/test_mount_facts.py mypy-3.11:index -test/units/playbook/test_base.py mypy-3.11:assignment test/units/module_utils/basic/test_exit_json.py mypy-3.10:assignment test/units/module_utils/basic/test_exit_json.py mypy-3.10:misc test/units/module_utils/facts/other/test_facter.py mypy-3.10:assignment @@ -222,7 +219,6 @@ test/units/module_utils/facts/test_facts.py mypy-3.14:assignment test/units/modules/mount_facts_data.py mypy-3.14:arg-type test/units/modules/test_apt.py mypy-3.14:name-match test/units/modules/test_mount_facts.py mypy-3.14:index -test/units/playbook/test_base.py mypy-3.14:assignment test/integration/targets/interpreter_discovery_python/library/test_non_python_interpreter.py shebang # test needs non-standard shebang test/integration/targets/inventory_script/bad_shebang shebang # test needs an invalid shebang test/integration/targets/ansible-test-sanity-pylint/ansible_collections/ns/col/plugins/lookup/deprecated.py pylint!skip # validated as a collection