Bump sanity test requirements for 3.12 (#81846)

pull/81853/head
Abhijeet Kasurde 2 years ago committed by GitHub
parent ce3954ba74
commit d8f791d88c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,11 +2,6 @@
set -eu set -eu
if [ "${ANSIBLE_TEST_PYTHON_VERSION}" = "3.12" ]; then
echo "skipping test, pylint is not supported on Python 3.12"
exit
fi
source ../collection/setup.sh source ../collection/setup.sh
# Create test scenarios at runtime that do not pass sanity tests. # Create test scenarios at runtime that do not pass sanity tests.

@ -1,13 +1,9 @@
# edit "sanity.pylint.in" and generate with: hacking/update-sanity-requirements.py --test pylint # edit "sanity.pylint.in" and generate with: hacking/update-sanity-requirements.py --test pylint
astroid==2.15.8 astroid==3.0.0
dill==0.3.7 dill==0.3.7
isort==5.12.0 isort==5.12.0
lazy-object-proxy==1.9.0
mccabe==0.7.0 mccabe==0.7.0
platformdirs==3.10.0 platformdirs==3.11.0
pylint==2.17.6 pylint==3.0.0
PyYAML==6.0.1 PyYAML==6.0.1
tomli==2.0.1
tomlkit==0.12.1 tomlkit==0.12.1
typing_extensions==4.8.0
wrapt==1.15.0

@ -82,12 +82,6 @@ class PylintTest(SanitySingleVersion):
"""Error code for ansible-test matching the format used by the underlying test program, or None if the program does not use error codes.""" """Error code for ansible-test matching the format used by the underlying test program, or None if the program does not use error codes."""
return 'ansible-test' return 'ansible-test'
@property
def supported_python_versions(self) -> t.Optional[tuple[str, ...]]:
"""A tuple of supported Python versions or None if the test does not depend on specific Python versions."""
# NOTE: When removing the Python 3.12 exclusion, be sure to update the ansible-test-sanity-pylint integration test.
return tuple(version for version in super().supported_python_versions if version != '3.12')
def filter_targets(self, targets: list[TestTarget]) -> list[TestTarget]: def filter_targets(self, targets: list[TestTarget]) -> list[TestTarget]:
"""Return the given list of test targets, filtered to include only those relevant for the test.""" """Return the given list of test targets, filtered to include only those relevant for the test."""
return [target for target in targets if os.path.splitext(target.path)[1] == '.py' or is_subdir(target.path, 'bin')] return [target for target in targets if os.path.splitext(target.path)[1] == '.py' or is_subdir(target.path, 'bin')]

@ -40,6 +40,7 @@ lib/ansible/modules/lineinfile.py validate-modules:doc-default-does-not-match-sp
lib/ansible/modules/lineinfile.py validate-modules:nonexistent-parameter-documented lib/ansible/modules/lineinfile.py validate-modules:nonexistent-parameter-documented
lib/ansible/modules/package_facts.py validate-modules:doc-choices-do-not-match-spec lib/ansible/modules/package_facts.py validate-modules:doc-choices-do-not-match-spec
lib/ansible/modules/replace.py validate-modules:nonexistent-parameter-documented lib/ansible/modules/replace.py validate-modules:nonexistent-parameter-documented
lib/ansible/modules/replace.py pylint:used-before-assignment # false positive detection by pylint
lib/ansible/modules/service.py validate-modules:nonexistent-parameter-documented lib/ansible/modules/service.py validate-modules:nonexistent-parameter-documented
lib/ansible/modules/service.py validate-modules:use-run-command-not-popen lib/ansible/modules/service.py validate-modules:use-run-command-not-popen
lib/ansible/modules/stat.py validate-modules:parameter-invalid lib/ansible/modules/stat.py validate-modules:parameter-invalid

Loading…
Cancel
Save