Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-ansible-compat for openSUSE:Factory checked in at 2024-11-14 16:09:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ansible-compat (Old) and /work/SRC/openSUSE:Factory/.python-ansible-compat.new.2017 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ansible-compat" Thu Nov 14 16:09:11 2024 rev:30 rq:1223997 version:24.10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-ansible-compat/python-ansible-compat.changes 2024-09-23 15:22:09.953302378 +0200 +++ /work/SRC/openSUSE:Factory/.python-ansible-compat.new.2017/python-ansible-compat.changes 2024-11-14 16:10:16.266741666 +0100 @@ -1,0 +2,9 @@ +Wed Nov 13 14:31:54 UTC 2024 - Johannes Kastl <opensuse_buildserv...@ojkastl.de> + +- update to 24.10.0: + * Enhancements + - Add support for py313 (#416) @ssbarnea + * Bugfixes + - Re-init plugin loader after collections installation (#411) (#412) @irozet12 + +------------------------------------------------------------------- Old: ---- python-ansible-compat-24.9.1.tar.gz New: ---- python-ansible-compat-24.10.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ansible-compat.spec ++++++ --- /var/tmp/diff_new_pack.mdc26q/_old 2024-11-14 16:10:16.950770233 +0100 +++ /var/tmp/diff_new_pack.mdc26q/_new 2024-11-14 16:10:16.954770399 +0100 @@ -24,7 +24,7 @@ %endif Name: python-ansible-compat -Version: 24.9.1 +Version: 24.10.0 Release: 0 Summary: Compatibility shim for Ansible 2.9 and newer License: MIT @@ -90,6 +90,7 @@ IGNORED_CHECKS="${IGNORED_CHECKS} or test_scan_sys_path[scanT-raises_not_foundF]" IGNORED_CHECKS="${IGNORED_CHECKS} or test_upgrade_collection" IGNORED_CHECKS="${IGNORED_CHECKS} or test_runtime_has_playbook" +IGNORED_CHECKS="${IGNORED_CHECKS} or test_load_plugins[modules]" # Disable checks on test names: https://github.com/pytest-dev/pytest-plus#user-content-avoiding-problematic-test-identifiers https://github.com/ansible/ansible-compat/issues/340 export PYTEST_CHECK_TEST_ID_REGEX=0 %pytest -k "not (${IGNORED_CHECKS})" ++++++ python-ansible-compat-24.9.1.tar.gz -> python-ansible-compat-24.10.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-24.9.1/.config/constraints.txt new/ansible-compat-24.10.0/.config/constraints.txt --- old/ansible-compat-24.9.1/.config/constraints.txt 2024-09-18 18:23:22.000000000 +0200 +++ new/ansible-compat-24.10.0/.config/constraints.txt 2024-11-10 21:15:03.000000000 +0100 @@ -1,275 +1,90 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --all-extras --output-file=.config/constraints.txt --strip-extras --unsafe-package=ansible-core --unsafe-package=resolvelib --unsafe-package=typing_extensions pyproject.toml -# -argparse-manpage==4.5 - # via ansible-compat (pyproject.toml) -attrs==23.2.0 - # via - # jsonschema - # referencing -babel==2.15.0 - # via mkdocs-material -beautifulsoup4==4.12.3 - # via - # linkchecker - # mkdocs-htmlproofer-plugin -black==24.4.2 - # via ansible-compat (pyproject.toml) -build==1.2.1 - # via pip-tools -cairocffi==1.7.0 - # via cairosvg -cairosvg==2.7.1 - # via mkdocs-ansible -certifi==2024.2.2 - # via requests -cffi==1.16.0 - # via - # cairocffi - # cryptography -charset-normalizer==3.3.2 - # via requests -click==8.1.7 - # via - # black - # mkdocs - # mkdocstrings - # pip-tools -colorama==0.4.6 - # via - # griffe - # mkdocs-material -coverage==7.5.1 - # via ansible-compat (pyproject.toml) -cryptography==42.0.7 - # via ansible-core -csscompressor==0.9.5 - # via mkdocs-minify-plugin -cssselect2==0.7.0 - # via cairosvg -defusedxml==0.7.1 - # via cairosvg -dnspython==2.6.1 - # via linkchecker -exceptiongroup==1.2.1 - # via pytest -ghp-import==2.1.0 - # via mkdocs -griffe==0.44.0 - # via mkdocstrings-python -htmlmin2==0.1.13 - # via mkdocs-minify-plugin -idna==3.7 - # via requests -iniconfig==2.0.0 - # via pytest -jinja2==3.1.4 - # via - # ansible-core - # mkdocs - # mkdocs-macros-plugin - # mkdocs-material - # mkdocstrings -jsmin==3.0.1 - # via mkdocs-minify-plugin -jsonschema==4.22.0 - # via ansible-compat (pyproject.toml) -jsonschema-specifications==2023.12.1 - # via jsonschema -linkchecker==10.4.0 - # via mkdocs-ansible -markdown==3.6 - # via - # markdown-include - # mkdocs - # mkdocs-autorefs - # mkdocs-htmlproofer-plugin - # mkdocs-material - # mkdocstrings - # pymdown-extensions -markdown-exec==1.8.1 - # via mkdocs-ansible -markdown-include==0.8.1 - # via mkdocs-ansible -markupsafe==2.1.5 - # via - # jinja2 - # mkdocs - # mkdocs-autorefs - # mkdocstrings -mergedeep==1.3.4 - # via - # mkdocs - # mkdocs-get-deps -mkdocs==1.6.0 - # via - # mkdocs-ansible - # mkdocs-autorefs - # mkdocs-gen-files - # mkdocs-htmlproofer-plugin - # mkdocs-macros-plugin - # mkdocs-material - # mkdocs-minify-plugin - # mkdocs-monorepo-plugin - # mkdocstrings -mkdocs-ansible==24.3.1 - # via ansible-compat (pyproject.toml) -mkdocs-autorefs==1.0.1 - # via mkdocstrings -mkdocs-gen-files==0.5.0 - # via mkdocs-ansible -mkdocs-get-deps==0.2.0 - # via mkdocs -mkdocs-htmlproofer-plugin==1.2.1 - # via mkdocs-ansible -mkdocs-macros-plugin==1.0.5 - # via mkdocs-ansible -mkdocs-material==9.5.21 - # via mkdocs-ansible -mkdocs-material-extensions==1.3.1 - # via - # mkdocs-ansible - # mkdocs-material -mkdocs-minify-plugin==0.8.0 - # via mkdocs-ansible -mkdocs-monorepo-plugin==1.1.0 - # via mkdocs-ansible -mkdocstrings==0.25.1 - # via - # mkdocs-ansible - # mkdocstrings-python -mkdocstrings-python==1.10.0 - # via mkdocs-ansible -mypy-extensions==1.0.0 - # via black -packaging==24.0 - # via - # ansible-compat (pyproject.toml) - # ansible-core - # black - # build - # mkdocs - # pipdeptree - # pytest -paginate==0.5.6 - # via mkdocs-material -pathspec==0.12.1 - # via - # black - # mkdocs -pillow==10.3.0 - # via - # cairosvg - # mkdocs-ansible -pip==24.0 - # via - # pip-tools - # pipdeptree -pip-tools==7.4.1 - # via ansible-compat (pyproject.toml) -pipdeptree==2.20.0 - # via mkdocs-ansible -platformdirs==4.2.1 - # via - # black - # mkdocs-get-deps - # mkdocstrings -pluggy==1.5.0 - # via pytest -pycparser==2.22 - # via cffi -pygments==2.18.0 - # via mkdocs-material -pymdown-extensions==10.8.1 - # via - # markdown-exec - # mkdocs-ansible - # mkdocs-material - # mkdocstrings -pyproject-hooks==1.1.0 - # via - # build - # pip-tools -pytest==8.2.0 - # via - # ansible-compat (pyproject.toml) - # pytest-mock - # pytest-plus -pytest-mock==3.14.0 - # via ansible-compat (pyproject.toml) -pytest-plus==0.7.0 - # via ansible-compat (pyproject.toml) -python-dateutil==2.9.0.post0 - # via - # ghp-import - # mkdocs-macros-plugin -python-slugify==8.0.4 - # via mkdocs-monorepo-plugin -pyyaml==6.0.1 - # via - # ansible-compat (pyproject.toml) - # ansible-core - # mkdocs - # mkdocs-get-deps - # mkdocs-macros-plugin - # pymdown-extensions - # pyyaml-env-tag -pyyaml-env-tag==0.1 - # via mkdocs -referencing==0.35.1 - # via - # jsonschema - # jsonschema-specifications -regex==2024.4.28 - # via mkdocs-material -requests==2.31.0 - # via - # linkchecker - # mkdocs-htmlproofer-plugin - # mkdocs-material -rpds-py==0.18.1 - # via - # jsonschema - # referencing -setuptools==69.5.1 - # via pip-tools -six==1.16.0 - # via python-dateutil -soupsieve==2.5 - # via beautifulsoup4 -subprocess-tee==0.4.1 - # via ansible-compat (pyproject.toml) -termcolor==2.4.0 - # via mkdocs-macros-plugin -text-unidecode==1.3 - # via python-slugify -tinycss2==1.3.0 - # via - # cairosvg - # cssselect2 -tomli==2.0.1 - # via - # argparse-manpage - # black - # build - # pip-tools - # pytest -typing-extensions==4.11.0 - # via black -urllib3==2.2.1 - # via requests -watchdog==4.0.0 - # via mkdocs -webencodings==0.5.1 - # via - # cssselect2 - # tinycss2 -wheel==0.43.0 - # via pip-tools +# This file was autogenerated by uv via the following command: +# tox run deps +argparse-manpage==4.6 # via ansible-compat (pyproject.toml) +attrs==24.2.0 # via jsonschema, referencing +babel==2.16.0 # via mkdocs-material +beautifulsoup4==4.12.3 # via linkchecker, mkdocs-htmlproofer-plugin +black==24.10.0 # via ansible-compat (pyproject.toml) +cairocffi==1.7.1 # via cairosvg +cairosvg==2.7.1 # via mkdocs-ansible +certifi==2024.8.30 # via requests +cffi==1.17.1 # via cairocffi, cryptography +charset-normalizer==3.4.0 # via requests +click==8.1.7 # via black, mkdocs, mkdocstrings +colorama==0.4.6 # via griffe, mkdocs-material +coverage==7.6.4 # via ansible-compat (pyproject.toml) +cryptography==43.0.3 # via ansible-core +csscompressor==0.9.5 # via mkdocs-minify-plugin +cssselect2==0.7.0 # via cairosvg +defusedxml==0.7.1 # via cairosvg +dnspython==2.7.0 # via linkchecker +exceptiongroup==1.2.2 # via pytest +ghp-import==2.1.0 # via mkdocs +griffe==1.5.1 # via mkdocstrings-python +hjson==3.1.0 # via mkdocs-macros-plugin, super-collections +htmlmin2==0.1.13 # via mkdocs-minify-plugin +idna==3.10 # via requests +iniconfig==2.0.0 # via pytest +jinja2==3.1.4 # via ansible-core, mkdocs, mkdocs-macros-plugin, mkdocs-material, mkdocstrings +jsmin==3.0.1 # via mkdocs-minify-plugin +jsonschema==4.23.0 # via ansible-compat (pyproject.toml) +jsonschema-specifications==2024.10.1 # via jsonschema +linkchecker==10.5.0 # via mkdocs-ansible +markdown==3.7 # via markdown-include, mkdocs, mkdocs-autorefs, mkdocs-htmlproofer-plugin, mkdocs-material, mkdocstrings, pymdown-extensions +markdown-exec==1.9.3 # via mkdocs-ansible +markdown-include==0.8.1 # via mkdocs-ansible +markupsafe==3.0.2 # via jinja2, mkdocs, mkdocs-autorefs, mkdocstrings +mergedeep==1.3.4 # via mkdocs, mkdocs-get-deps +mkdocs==1.6.1 # via mkdocs-ansible, mkdocs-autorefs, mkdocs-gen-files, mkdocs-htmlproofer-plugin, mkdocs-macros-plugin, mkdocs-material, mkdocs-minify-plugin, mkdocs-monorepo-plugin, mkdocstrings +mkdocs-ansible==24.3.1 # via ansible-compat (pyproject.toml) +mkdocs-autorefs==1.2.0 # via mkdocstrings, mkdocstrings-python +mkdocs-gen-files==0.5.0 # via mkdocs-ansible +mkdocs-get-deps==0.2.0 # via mkdocs +mkdocs-htmlproofer-plugin==1.3.0 # via mkdocs-ansible +mkdocs-macros-plugin==1.3.7 # via mkdocs-ansible +mkdocs-material==9.5.44 # via mkdocs-ansible +mkdocs-material-extensions==1.3.1 # via mkdocs-ansible, mkdocs-material +mkdocs-minify-plugin==0.8.0 # via mkdocs-ansible +mkdocs-monorepo-plugin==1.1.0 # via mkdocs-ansible +mkdocstrings==0.27.0 # via mkdocs-ansible, mkdocstrings-python +mkdocstrings-python==1.12.2 # via mkdocs-ansible +mypy-extensions==1.0.0 # via black +packaging==24.2 # via ansible-core, black, mkdocs, mkdocs-macros-plugin, pipdeptree, pytest, ansible-compat (pyproject.toml) +paginate==0.5.7 # via mkdocs-material +pathspec==0.12.1 # via black, mkdocs, mkdocs-macros-plugin +pillow==11.0.0 # via cairosvg, mkdocs-ansible +pipdeptree==2.23.4 # via mkdocs-ansible +platformdirs==4.3.6 # via black, mkdocs-get-deps, mkdocstrings +pluggy==1.5.0 # via pytest +pycparser==2.22 # via cffi +pygments==2.18.0 # via mkdocs-material +pymdown-extensions==10.12 # via markdown-exec, mkdocs-ansible, mkdocs-material, mkdocstrings +pytest==8.3.3 # via pytest-mock, pytest-plus, ansible-compat (pyproject.toml) +pytest-mock==3.14.0 # via ansible-compat (pyproject.toml) +pytest-plus==0.7.0 # via ansible-compat (pyproject.toml) +python-dateutil==2.9.0.post0 # via ghp-import, mkdocs-macros-plugin +python-slugify==8.0.4 # via mkdocs-monorepo-plugin +pyyaml==6.0.2 # via ansible-core, mkdocs, mkdocs-get-deps, mkdocs-macros-plugin, pymdown-extensions, pyyaml-env-tag, ansible-compat (pyproject.toml) +pyyaml-env-tag==0.1 # via mkdocs +referencing==0.35.1 # via jsonschema, jsonschema-specifications +regex==2024.11.6 # via mkdocs-material +requests==2.32.3 # via linkchecker, mkdocs-htmlproofer-plugin, mkdocs-material +rpds-py==0.21.0 # via jsonschema, referencing +six==1.16.0 # via python-dateutil +soupsieve==2.6 # via beautifulsoup4 +subprocess-tee==0.4.2 # via ansible-compat (pyproject.toml) +super-collections==0.5.3 # via mkdocs-macros-plugin +termcolor==2.5.0 # via mkdocs-macros-plugin +text-unidecode==1.3 # via python-slugify +tinycss2==1.4.0 # via cairosvg, cssselect2 +tomli==2.0.2 # via argparse-manpage, black, pytest +urllib3==2.2.3 # via requests +watchdog==6.0.0 # via mkdocs +webencodings==0.5.1 # via cssselect2, tinycss2 -# The following packages are considered to be unsafe in a requirements file: +# The following packages were excluded from the output: # ansible-core +# pip # resolvelib +# typing-extensions +# uv diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-24.9.1/.config/requirements-test.in new/ansible-compat-24.10.0/.config/requirements-test.in --- old/ansible-compat-24.9.1/.config/requirements-test.in 2024-09-18 18:23:22.000000000 +0200 +++ new/ansible-compat-24.10.0/.config/requirements-test.in 2024-11-10 21:15:03.000000000 +0100 @@ -1,5 +1,6 @@ coverage -pip-tools +pip pytest-mock pytest-plus>=0.6.1 pytest>=7.2.0 +uv>=0.4.30 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-24.9.1/.git_archival.txt new/ansible-compat-24.10.0/.git_archival.txt --- old/ansible-compat-24.9.1/.git_archival.txt 2024-09-18 18:23:22.000000000 +0200 +++ new/ansible-compat-24.10.0/.git_archival.txt 2024-11-10 21:15:03.000000000 +0100 @@ -1,4 +1,4 @@ -node: 16538ab64884462d8afdf35b97cb1f02299cef69 -node-date: 2024-09-18T17:23:22+01:00 -describe-name: v24.9.1 -ref-names: HEAD -> main, tag: v24.9.1 +node: ba624e9511a76f29fd12cff3e01feef1458d3acf +node-date: 2024-11-10T20:15:03Z +describe-name: v24.10.0 +ref-names: HEAD -> main, tag: v24.10.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-24.9.1/.github/dependabot.yml new/ansible-compat-24.10.0/.github/dependabot.yml --- old/ansible-compat-24.9.1/.github/dependabot.yml 2024-09-18 18:23:22.000000000 +0200 +++ new/ansible-compat-24.10.0/.github/dependabot.yml 2024-11-10 21:15:03.000000000 +0100 @@ -2,14 +2,13 @@ version: 2 updates: - package-ecosystem: pip - directory: ".config" + directory: /.config/ schedule: day: sunday interval: weekly labels: - dependabot-deps-updates - skip-changelog - versioning-strategy: lockfile-only groups: dependencies: patterns: @@ -17,8 +16,7 @@ - package-ecosystem: "github-actions" directory: "/" schedule: - interval: weekly - open-pull-requests-limit: 3 + interval: daily labels: - "dependencies" - "skip-changelog" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-24.9.1/.github/workflows/tox.yml new/ansible-compat-24.10.0/.github/workflows/tox.yml --- old/ansible-compat-24.9.1/.github/workflows/tox.yml 2024-09-18 18:23:22.000000000 +0200 +++ new/ansible-compat-24.10.0/.github/workflows/tox.yml 2024-11-10 21:15:03.000000000 +0100 @@ -20,10 +20,10 @@ steps: - name: Determine matrix id: generate_matrix - uses: coactions/dynamic-matrix@v3 + uses: coactions/dynamic-matrix@v4 with: min_python: "3.9" - max_python: "3.12" + max_python: "3.13" default_python: "3.10" other_names: | lint @@ -37,6 +37,7 @@ py312-ansible216 py312-ansible217 py312-devel + py313-devel smoke platforms: linux,macos macos: minmax @@ -50,7 +51,7 @@ matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} env: FORCE_COLOR: 1 - PYTEST_REQPASS: 108 + PYTEST_REQPASS: 109 steps: - uses: actions/checkout@v4 with: @@ -149,7 +150,7 @@ - name: Check for expected number of coverage.xml reports run: | - JOBS_PRODUCING_COVERAGE=14 + JOBS_PRODUCING_COVERAGE=16 if [ "$(find . -name coverage.xml | wc -l | bc)" -ne "${JOBS_PRODUCING_COVERAGE}" ]; then echo "::error::Number of coverage.xml files was not the expected one (${JOBS_PRODUCING_COVERAGE}): $(find . -name coverage.xml |xargs echo)" exit 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-24.9.1/.pre-commit-config.yaml new/ansible-compat-24.10.0/.pre-commit-config.yaml --- old/ansible-compat-24.9.1/.pre-commit-config.yaml 2024-09-18 18:23:22.000000000 +0200 +++ new/ansible-compat-24.10.0/.pre-commit-config.yaml 2024-11-10 21:15:03.000000000 +0100 @@ -22,7 +22,7 @@ )$ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.6.3" + rev: "v0.7.2" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -41,7 +41,7 @@ - prettier-plugin-toml - prettier-plugin-sort-json - repo: https://github.com/pre-commit/pre-commit-hooks.git - rev: v4.6.0 + rev: v5.0.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace @@ -68,12 +68,12 @@ types: [file, yaml] entry: yamllint --strict - repo: https://github.com/psf/black - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black language_version: python3 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.13.0 hooks: - id: mypy # empty args needed in order to match mypy cli behavior @@ -90,7 +90,7 @@ - types-setuptools - types-jsonschema>=4.4.9 - repo: https://github.com/pycqa/pylint - rev: v3.2.7 + rev: v3.3.1 hooks: - id: pylint additional_dependencies: @@ -105,20 +105,20 @@ name: Upgrade constraints files and requirements files: ^(pyproject\.toml|requirements\.txt)$ language: python - entry: python3 -m piptools compile --resolver=backtracking --upgrade -q --strip-extras --all-extras --output-file=.config/constraints.txt pyproject.toml --unsafe-package ansible-core --unsafe-package resolvelib --unsafe-package typing_extensions + entry: python3 -m uv pip compile -q --all-extras --output-file=.config/constraints.txt pyproject.toml --upgrade pass_filenames: false stages: - manual additional_dependencies: - - pip-tools>=7.4.1 + - uv>=0.4.3 - id: pip-compile name: Check constraints files and requirements files: ^(pyproject\.toml|requirements\.txt)$ language: python - entry: python3 -m piptools compile --resolver=backtracking -q --strip-extras --all-extras --output-file=.config/constraints.txt pyproject.toml --unsafe-package ansible-core --unsafe-package resolvelib --unsafe-package typing_extensions + entry: python3 -m uv pip compile -q --all-extras --output-file=.config/constraints.txt pyproject.toml pass_filenames: false additional_dependencies: - - pip-tools>=7.4.1 + - uv>=0.4.3 - repo: https://github.com/packit/pre-commit-hooks rev: v1.2.0 hooks: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-24.9.1/pyproject.toml new/ansible-compat-24.10.0/pyproject.toml --- old/ansible-compat-24.9.1/pyproject.toml 2024-09-18 18:23:22.000000000 +0200 +++ new/ansible-compat-24.10.0/pyproject.toml 2024-11-10 21:15:03.000000000 +0100 @@ -28,6 +28,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python", "Topic :: System :: Systems Administration", "Topic :: Software Development :: Bug Tracking", @@ -397,3 +398,8 @@ "--match", "v*.*", ] + +[tool.uv.pip] +annotation-style = "line" +no-emit-package = ["ansible-core", "pip", "resolvelib", "typing_extensions", "uv"] +custom-compile-command = "tox run deps" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-24.9.1/src/ansible_compat/runtime.py new/ansible-compat-24.10.0/src/ansible_compat/runtime.py --- old/ansible-compat-24.9.1/src/ansible_compat/runtime.py 2024-09-18 18:23:22.000000000 +0200 +++ new/ansible-compat-24.10.0/src/ansible_compat/runtime.py 2024-11-10 21:15:03.000000000 +0100 @@ -155,6 +155,7 @@ initialized: bool = False plugins: Plugins _has_playbook_cache: dict[tuple[str, Path | None], bool] = {} + require_module: bool = False def __init__( self, @@ -218,6 +219,7 @@ msg = f"Found incompatible version of ansible runtime {self.version}, instead of {min_required_version} or newer." raise RuntimeError(msg) if require_module: + self.require_module = True self._ensure_module_available() # pylint: disable=import-outside-toplevel @@ -339,18 +341,21 @@ # https://github.com/ansible/ansible-lint/issues/2945 if not Runtime.initialized: col_path = [f"{self.cache_dir}/collections"] + # noinspection PyProtectedMember + from ansible.utils.collection_loader._collection_finder import ( # pylint: disable=import-outside-toplevel + _AnsibleCollectionFinder, + ) + if self.version >= Version("2.15.0.dev0"): # pylint: disable=import-outside-toplevel,no-name-in-module from ansible.plugins.loader import init_plugin_loader + _AnsibleCollectionFinder( # noqa: SLF001 + paths=col_path, + )._remove() # pylint: disable=protected-access init_plugin_loader(col_path) else: # noinspection PyProtectedMember - from ansible.utils.collection_loader._collection_finder import ( # pylint: disable=import-outside-toplevel - _AnsibleCollectionFinder, - ) - - # noinspection PyProtectedMember # pylint: disable=protected-access col_path += self.config.collections_paths col_path += os.path.dirname( # noqa: PTH120 @@ -622,6 +627,9 @@ if result.returncode != 0: _logger.error(result.stderr) raise AnsibleCommandError(result) + if self.require_module: + Runtime.initialized = False + self._ensure_module_available() # pylint: disable=too-many-locals def prepare_environment( # noqa: C901 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-24.9.1/test/collections/acme.goodies/tests/requirements.yml new/ansible-compat-24.10.0/test/collections/acme.goodies/tests/requirements.yml --- old/ansible-compat-24.9.1/test/collections/acme.goodies/tests/requirements.yml 2024-09-18 18:23:22.000000000 +0200 +++ new/ansible-compat-24.10.0/test/collections/acme.goodies/tests/requirements.yml 2024-11-10 21:15:03.000000000 +0100 @@ -1,3 +1,3 @@ collections: - name: ansible.posix - version: ">=1.0" + version: "1.5.4" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-24.9.1/test/conftest.py new/ansible-compat-24.10.0/test/conftest.py --- old/ansible-compat-24.9.1/test/conftest.py 2024-09-18 18:23:22.000000000 +0200 +++ new/ansible-compat-24.10.0/test/conftest.py 2024-11-10 21:15:03.000000000 +0100 @@ -14,7 +14,7 @@ from ansible_compat.runtime import Runtime -@pytest.fixture() +@pytest.fixture # pylint: disable=unused-argument def runtime(scope: str = "session") -> Generator[Runtime, None, None]: # noqa: ARG001 """Isolated runtime fixture.""" @@ -23,7 +23,7 @@ instance.clean() -@pytest.fixture() +@pytest.fixture # pylint: disable=unused-argument def runtime_tmp( tmp_path: pathlib.Path, @@ -44,7 +44,7 @@ return importlib.metadata.version(pkg) -@pytest.fixture() +@pytest.fixture def pkg_version() -> Callable[[str], str]: """Get the version of a current installed package. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-24.9.1/test/test_config.py new/ansible-compat-24.10.0/test/test_config.py --- old/ansible-compat-24.9.1/test/test_config.py 2024-09-18 18:23:22.000000000 +0200 +++ new/ansible-compat-24.10.0/test/test_config.py 2024-11-10 21:15:03.000000000 +0100 @@ -24,7 +24,7 @@ assert isinstance(config.CONNECTION_FACTS_MODULES, dict) assert config.ANSIBLE_COW_PATH is None assert isinstance(config.NETWORK_GROUP_MODULES, list) - assert isinstance(config.DEFAULT_GATHER_TIMEOUT, (int, type(None))) + assert isinstance(config.DEFAULT_FORKS, (int, type(None))) # check lowercase and older name aliasing assert isinstance(config.collections_paths, list) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-24.9.1/test/test_runtime.py new/ansible-compat-24.10.0/test/test_runtime.py --- old/ansible-compat-24.9.1/test/test_runtime.py 2024-09-18 18:23:22.000000000 +0200 +++ new/ansible-compat-24.10.0/test/test_runtime.py 2024-11-10 21:15:03.000000000 +0100 @@ -13,6 +13,7 @@ from typing import TYPE_CHECKING, Any import pytest +from ansible.plugins.loader import module_loader from packaging.version import Version from ansible_compat.constants import INVALID_PREREQUISITES_RC @@ -742,6 +743,43 @@ runtime.clean() +@pytest.mark.parametrize( + ("path", "expected_plugins"), + ( + pytest.param( + "test/collections/acme.goodies", + [ + "ansible.posix.patch", # from tests/requirements.yml + "community.crypto.acme_account", # from galaxy.yml as a git dependency + ], + id="modules", + ), + ), +) +def test_load_plugins( + path: str, + expected_plugins: list[str], +) -> None: + """Tests ability to load plugin from a collection installed by requirement.""" + with cwd(Path(path)): + from ansible_compat.prerun import get_cache_dir + + rmtree(get_cache_dir(Path.cwd()), ignore_errors=True) + runtime = Runtime(isolated=True, require_module=True) + runtime.prepare_environment(install_local=True) + for plugin_name in expected_plugins: + loaded_module = module_loader.find_plugin_with_context( + plugin_name, + ignore_deprecated=True, + check_aliases=True, + ) + assert ( + loaded_module.resolved_fqcn is not None + ), f"Unable to load module {plugin_name}" + + runtime.clean() + + def test_install_collection_from_disk_fail() -> None: """Tests that we fail to install a broken collection.""" with cwd(Path("test/collections/acme.broken")): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-24.9.1/tox.ini new/ansible-compat-24.10.0/tox.ini --- old/ansible-compat-24.9.1/tox.ini 2024-09-18 18:23:22.000000000 +0200 +++ new/ansible-compat-24.10.0/tox.ini 2024-11-10 21:15:03.000000000 +0100 @@ -24,6 +24,7 @@ requires = tox >= 4.6.3 tox-extra >= 2.0.1 + tox-uv setuptools >= 65.3.0 # editable installs [testenv] @@ -100,7 +101,9 @@ # locked basepython is needed because to keep constrains.txt predictable basepython = python3.10 deps = - pre-commit>=2.6.0 + pip + pre-commit>=4.0.1 + pre-commit-uv>=1.15.0 skip_install = true usedevelop = false commands = @@ -131,6 +134,7 @@ Build package, verify metadata, install package and assert behavior when ansible is missing. deps = build >= 0.9.0 + pip twine >= 4.0.1 skip_install = true # Ref: https://twitter.com/di_codes/status/1044358639081975813