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 2022-12-12 17:39:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ansible-compat (Old) and /work/SRC/openSUSE:Factory/.python-ansible-compat.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ansible-compat" Mon Dec 12 17:39:39 2022 rev:11 rq:1042256 version:2.2.7 Changes: -------- --- /work/SRC/openSUSE:Factory/python-ansible-compat/python-ansible-compat.changes 2022-12-02 13:13:51.394089203 +0100 +++ /work/SRC/openSUSE:Factory/.python-ansible-compat.new.1835/python-ansible-compat.changes 2022-12-12 17:41:45.973815464 +0100 @@ -1,0 +2,7 @@ +Sat Dec 10 16:53:30 UTC 2022 - Johannes Kastl <ka...@b1-systems.de> + +- update to 2.2.7: + * Bugfixes + - Restore offline more functionality (#201) @ssbarnea + +------------------------------------------------------------------- Old: ---- ansible-compat-2.2.6.tar.gz New: ---- ansible-compat-2.2.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ansible-compat.spec ++++++ --- /var/tmp/diff_new_pack.2U6r6Y/_old 2022-12-12 17:41:46.481818321 +0100 +++ /var/tmp/diff_new_pack.2U6r6Y/_new 2022-12-12 17:41:46.485818343 +0100 @@ -26,7 +26,7 @@ %endif Name: python-ansible-compat -Version: 2.2.6 +Version: 2.2.7 Release: 0 Summary: Compatibility shim for Ansible 2.9 and newer License: MIT ++++++ ansible-compat-2.2.6.tar.gz -> ansible-compat-2.2.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/.github/workflows/tox.yml new/ansible-compat-2.2.7/.github/workflows/tox.yml --- old/ansible-compat-2.2.6/.github/workflows/tox.yml 2022-11-30 21:44:11.000000000 +0100 +++ new/ansible-compat-2.2.7/.github/workflows/tox.yml 2022-12-09 23:51:06.000000000 +0100 @@ -1,5 +1,4 @@ name: tox - on: create: # is used for publishing to PyPI and TestPyPI tags: # any tag regardless of its name, no branches @@ -10,83 +9,23 @@ pull_request: schedule: - cron: 1 0 * * * # Run daily at 0:01 UTC - # Run every Friday at 18:02 UTC - # https://crontab.guru/#2_18_*_*_5 - # - cron: 2 18 * * 5 workflow_call: jobs: - linters: - name: ${{ matrix.env.TOXENV }} + build: + name: ${{ matrix.name || matrix.tox_env }} runs-on: ${{ matrix.os || 'ubuntu-22.04' }} strategy: fail-fast: false matrix: python-version: - 3.9 - env: - - TOXENV: lint - - TOXENV: docs - - TOXENV: pkg - env: - FORCE_COLOR: 1 - - steps: - - name: Check out src from Git - uses: actions/checkout@v3 - with: - fetch-depth: 0 # needed by setuptools-scm - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Pre-commit cache - uses: actions/cache@v3 - with: - path: ~/.cache/pre-commit - key: ${{ matrix.name }}-pre-commit-${{ hashFiles('setup.cfg', 'tox.ini', 'pyproject.toml', '.pre-commit-config.yaml') }} - - - name: Pip cache - uses: actions/cache@v3 - with: - path: ~/.cache/pip - key: ${{ matrix.name }}-pip-${{ hashFiles('setup.cfg', 'tox.ini', 'pyproject.toml', '.pre-commit-config.yaml') }} - - - name: Install tox - run: python3 -m pip install --upgrade 'tox>=4.0.0rc1' - - - name: Log installed dists - run: python -m pip freeze --all - - - name: Initialize tox envs - run: python -m tox --notest --skip-missing-interpreters false -vv - env: ${{ matrix.env }} - - - name: Test with tox - run: python -m tox - env: ${{ matrix.env }} - - - name: Archive logs - uses: actions/upload-artifact@v3 - with: - name: logs.zip - path: .tox/**/log/ - - unit: - name: ${{ matrix.name || matrix.tox_env }} - runs-on: ${{ matrix.os || 'ubuntu-22.04' }} - strategy: - fail-fast: false - matrix: - name: - # cannot use "," in name as it will break actions/cache - - py38 + os: + - ubuntu-22.04 tox_env: - - py38 - python-version: - - "3.8" + - lint + - docs + - pkg include: # keep list sorted as it determines UI order too # linux (py38 comes from matrix): @@ -120,25 +59,18 @@ # macos - name: py38@macos tox_env: py38,py38-ansible29 # 2.14(devel) does not support 3.8 - os: macOS-latest + os: macos-12 python-version: 3.8 - - name: py310@macos - tox_env: py310,py310-devel - os: macOS-latest - python-version: "3.10" - + - name: py311@macos + tox_env: py311,py311-devel + os: macos-12 + python-version: "3.11" env: - TOX_PARALLEL_NO_SPINNER: 1 FORCE_COLOR: 1 steps: - - name: MacOS workaround for https://github.com/actions/virtual-environments/issues/1187 - if: ${{ matrix.os == 'macOS-latest' }} - run: | - sudo sysctl -w net.link.generic.system.hwcksum_tx=0 - sudo sysctl -w net.link.generic.system.hwcksum_rx=0 - - - uses: actions/checkout@v3 + - name: Check out src from Git + uses: actions/checkout@v3 with: fetch-depth: 0 # needed by setuptools-scm @@ -147,61 +79,48 @@ with: python-version: ${{ matrix.python-version }} - - name: Log the currently selected Python version info (${{ matrix.python-version }}) - run: | - python --version --version - which python + - name: Pre-commit cache + uses: actions/cache@v3 + with: + path: ~/.cache/pre-commit + key: ${{ matrix.name }}-pre-commit-${{ hashFiles('setup.cfg', 'tox.ini', 'pyproject.toml', '.pre-commit-config.yaml') }} - name: Pip cache uses: actions/cache@v3 with: path: ~/.cache/pip - key: ${{ runner.os }}-${{ matrix.name }}-pip-${{ hashFiles('constraints.txt', 'setup.cfg', 'tox.ini', 'pyproject.toml', '.pre-commit-config.yaml', 'pytest.ini') }} + key: ${{ matrix.name }}-pip-${{ hashFiles('setup.cfg', 'tox.ini', 'pyproject.toml', '.pre-commit-config.yaml') }} - name: Install tox - run: python3 -m pip install --upgrade "tox>=4.0.0rc1" - - - name: Log installed dists - run: python3 -m pip freeze --all + run: python3 -m pip install --upgrade 'tox>=4.0.3' - name: Initialize tox envs - run: python3 -m tox --notest --skip-missing-interpreters false -vv -e ${{ matrix.tox_env }} - - - name: "Test with tox: ${{ matrix.tox_env }}" - run: python3 -m tox -e ${{ matrix.tox_env }} + run: python -m tox --notest --skip-missing-interpreters false -vv -e ${{ matrix.tox_env }} - - name: Upload coverage data - if: "runner.os == 'Linux'" - uses: codecov/codecov-action@v3 - with: - name: ${{ matrix.tox_env }} - fail_ci_if_error: false # see https://github.com/codecov/codecov-action/issues/598 - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true # optional (default = false) + - name: Test with tox + run: python -m tox -e ${{ matrix.tox_env }} - name: Archive logs uses: actions/upload-artifact@v3 with: name: logs.zip path: .tox/**/log/ - # https://github.com/actions/upload-artifact/issues/123 - continue-on-error: true - - name: Report junit failures - uses: shyim/junit-report-annotations-action@3d2e5374f2b13e70f6f3209a21adfdbc42c466ae + - name: Upload coverage data + if: ${{ startsWith(matrix.tox_env, 'py') }} + uses: codecov/codecov-action@v3 with: - path: .tox/junit.*.xml - if: always() + name: ${{ matrix.tox_env }} + fail_ci_if_error: false # see https://github.com/codecov/codecov-action/issues/598 + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true # optional (default = false) check: # This job does nothing and is only used for the branch protection if: always() needs: - - linters - - unit - - runs-on: ubuntu-latest - + - build + runs-on: ubuntu-22.04 steps: - name: Decide whether the needed jobs succeeded or failed uses: re-actors/alls-green@release/v1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/.pre-commit-config.yaml new/ansible-compat-2.2.7/.pre-commit-config.yaml --- old/ansible-compat-2.2.6/.pre-commit-config.yaml 2022-11-30 21:44:11.000000000 +0100 +++ new/ansible-compat-2.2.7/.pre-commit-config.yaml 2022-12-09 23:51:06.000000000 +0100 @@ -23,7 +23,7 @@ - prettier - prettier-plugin-toml - repo: https://github.com/pre-commit/pre-commit-hooks.git - rev: v4.3.0 + rev: v4.4.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace @@ -61,12 +61,12 @@ # https://github.com/pre-commit/mirrors-isort/issues/9#issuecomment-624404082 - --filter-files - repo: https://github.com/psf/black - rev: 22.10.0 + rev: 22.12.0 hooks: - id: black language_version: python3 - repo: https://github.com/pycqa/flake8.git - rev: 5.0.4 + rev: 6.0.0 hooks: - id: flake8 language_version: python3 @@ -77,14 +77,13 @@ - flake8-rst-docstrings>=0.2.3 - flake8-rst>=0.8.0 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.982 + rev: v0.991 hooks: - id: mypy # empty args needed in order to match mypy cli behavior args: ["--strict"] additional_dependencies: - cached_property - - flaky - packaging - pytest - pytest-mock @@ -93,12 +92,11 @@ - types-pkg_resources - types-jsonschema>=4.4.9 - repo: https://github.com/pycqa/pylint - rev: v2.15.5 + rev: v2.15.8 hooks: - id: pylint additional_dependencies: - PyYAML - - flaky - pytest - typing_extensions # Keep last due to being considerably slower than the others: @@ -107,19 +105,19 @@ - id: pip-compile-upgrade # To run it execute: `pre-commit run pip-compile-upgrade --hook-stage manual` name: Upgrade constraints files and requirements - files: ^(setup\.py|setup\.cfg|requirements\.txt)$ + files: ^(pyproject\.toml|requirements\.txt)$ language: python - entry: python -m piptools compile --upgrade -q --extra docs --extra test --output-file=requirements.txt pyproject.toml + entry: python -m piptools compile --resolver=backtracking --upgrade -q --extra docs --extra test --output-file=requirements.txt pyproject.toml pass_filenames: false stages: - manual additional_dependencies: - - pip-tools>=6.10.0 + - pip-tools>=6.11.0 - id: pip-compile name: Check constraints files and requirements - files: ^(setup\.py|setup\.cfg|requirements\.txt)$ + files: ^(pyproject\.toml|requirements\.txt)$ language: python - entry: python -m piptools compile -q --extra docs --extra test --output-file=requirements.txt pyproject.toml + entry: python -m piptools compile --resolver=backtracking -q --extra docs --extra test --output-file=requirements.txt pyproject.toml pass_filenames: false additional_dependencies: - - pip-tools>=6.10.0 + - pip-tools>=6.11.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/.pylintrc new/ansible-compat-2.2.7/.pylintrc --- old/ansible-compat-2.2.6/.pylintrc 2022-11-30 21:44:11.000000000 +0100 +++ new/ansible-compat-2.2.7/.pylintrc 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -[BASIC] -good-names=f, # filename - i, - j, - k, - ns, # namespace - ex, - Run, - _ - -[IMPORTS] -preferred-modules = - unittest:pytest, - -[MESSAGES CONTROL] - -disable = - # On purpose disabled as we rely on black - line-too-long, - # local imports do not work well with pre-commit hook - import-error, - # Temporary disable duplicate detection we remove old code from prerun - duplicate-code, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/PKG-INFO new/ansible-compat-2.2.7/PKG-INFO --- old/ansible-compat-2.2.6/PKG-INFO 2022-11-30 21:44:32.828846500 +0100 +++ new/ansible-compat-2.2.7/PKG-INFO 2022-12-09 23:51:26.114431600 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ansible-compat -Version: 2.2.6 +Version: 2.2.7 Summary: Ansible compatibility goodies Author-email: Sorin Sbarnea <ssbar...@redhat.com> Maintainer-email: Sorin Sbarnea <ssbar...@redhat.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/examples/reqs_v1/requirements.yml new/ansible-compat-2.2.7/examples/reqs_v1/requirements.yml --- old/ansible-compat-2.2.6/examples/reqs_v1/requirements.yml 2022-11-30 21:44:11.000000000 +0100 +++ new/ansible-compat-2.2.7/examples/reqs_v1/requirements.yml 2022-12-09 23:51:06.000000000 +0100 @@ -1,2 +1,4 @@ # v1 requirements test file -- src: geerlingguy.mysql +# ansible-galaxy role install -r requirements.yml -p roles +- src: git+https://github.com/geerlingguy/ansible-role-docker.git + name: geerlingguy.mysql Binary files old/ansible-compat-2.2.6/examples/reqs_v2/community-molecule-0.1.0.tar.gz and new/ansible-compat-2.2.7/examples/reqs_v2/community-molecule-0.1.0.tar.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/examples/reqs_v2/requirements.yml new/ansible-compat-2.2.7/examples/reqs_v2/requirements.yml --- old/ansible-compat-2.2.6/examples/reqs_v2/requirements.yml 2022-11-30 21:44:11.000000000 +0100 +++ new/ansible-compat-2.2.7/examples/reqs_v2/requirements.yml 2022-12-09 23:51:06.000000000 +0100 @@ -1,5 +1,11 @@ --- +# For local install run: +# ansible-galaxy role install -r requirements.yml -p roles +# ansible-galaxy collection install -r requirements.yml -p collections +# +# Current test file avoids using galaxy server on purpose, for resiliency roles: - - name: geerlingguy.mysql + - src: git+https://github.com/geerlingguy/ansible-role-docker.git + name: geerlingguy.mysql collections: - - name: ssbarnea.molecule + - name: community-molecule-0.1.0.tar.gz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/mypy.ini new/ansible-compat-2.2.7/mypy.ini --- old/ansible-compat-2.2.6/mypy.ini 2022-11-30 21:44:11.000000000 +0100 +++ new/ansible-compat-2.2.7/mypy.ini 1970-01-01 01:00:00.000000000 +0100 @@ -1,29 +0,0 @@ -[mypy] -python_version = 3.8 -color_output = True -error_summary = True -disallow_untyped_calls = True -disallow_untyped_defs = True -disallow_any_generics = True -; disallow_any_unimported = True -; warn_redundant_casts = True -; warn_return_any = True -; warn_unused_configs = True -exclude = test/local-content - -[mypy-ansible.release] -ignore_missing_imports = True - -[mypy-cached_property] -# https://github.com/pydanny/cached-property/issues/172 -ignore_missing_imports = True - -[mypy-flaky] -# https://github.com/box/flaky/issues/170 -ignore_missing_imports = True - -[mypy-pytest] -ignore_missing_imports = True - -[mypy-setuptools] -ignore_missing_imports = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/pyproject.toml new/ansible-compat-2.2.7/pyproject.toml --- old/ansible-compat-2.2.6/pyproject.toml 2022-11-30 21:44:11.000000000 +0100 +++ new/ansible-compat-2.2.7/pyproject.toml 2022-12-09 23:51:06.000000000 +0100 @@ -56,14 +56,7 @@ "sphinx_ansible_theme", "myst_parser", ] -test = [ - "coverage", - "flaky", - "pip-tools", - "pytest>=7.2.0", - "pytest-mock", - "pytest-plus", -] +test = ["coverage", "pip-tools", "pytest>=7.2.0", "pytest-mock", "pytest-plus"] [tool.coverage.run] source = ["src"] @@ -73,11 +66,48 @@ exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"] skip_covered = true +[tool.mypy] +python_version = 3.8 +color_output = true +error_summary = true +disallow_untyped_calls = true +disallow_untyped_defs = true +disallow_any_generics = true +# disallow_any_unimported = True +#; warn_redundant_casts = True +# warn_return_any = True +# warn_unused_configs = True +exclude = "test/local-content" + [tool.isort] profile = "black" +[tool.pylint.BASIC] +good-names = [ + "f", # filename + "i", + "j", + "k", + "ns", # namespace + "ex", + "Run", + "_" +] + +[tool.pylint.IMPORTS] +preferred-modules = ["unittest:pytest"] + +[tool.pylint."MESSAGES CONTROL"] +disable = [ + # On purpose disabled as we rely on black + "line-too-long", + # local imports do not work well with pre-commit hook + "import-error", + # Temporary disable duplicate detection we remove old code from prerun + "duplicate-code", +] + [tool.pytest.ini_options] -addopts = "--no-success-flaky-report" # ensure we treat warnings as error filterwarnings = ["error"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/requirements.txt new/ansible-compat-2.2.7/requirements.txt --- old/ansible-compat-2.2.6/requirements.txt 2022-11-30 21:44:11.000000000 +0100 +++ new/ansible-compat-2.2.7/requirements.txt 2022-12-09 23:51:06.000000000 +0100 @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile with python 3.9 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: # -# pip-compile --extra=docs --extra=test --output-file=requirements.txt pyproject.toml +# pip-compile --extra=docs --extra=test --output-file=requirements.txt --resolver=backtracking pyproject.toml # alabaster==0.7.12 # via sphinx @@ -16,7 +16,7 @@ # via sphinx build==0.9.0 # via pip-tools -certifi==2022.9.24 +certifi==2022.12.7 # via requests charset-normalizer==2.1.1 # via requests @@ -33,8 +33,6 @@ # sphinx-rtd-theme exceptiongroup==1.0.4 # via pytest -flaky==3.7.0 - # via ansible-compat (pyproject.toml) idna==3.4 # via requests imagesize==1.4.1 @@ -57,7 +55,7 @@ # myst-parser markupsafe==2.1.1 # via jinja2 -mdit-py-plugins==0.3.1 +mdit-py-plugins==0.3.3 # via myst-parser mdurl==0.1.2 # via markdown-it-py @@ -65,7 +63,7 @@ # via pytest-plus myst-parser==0.18.1 # via ansible-compat (pyproject.toml) -packaging==21.3 +packaging==22.0 # via # ansible-compat (pyproject.toml) # build @@ -73,7 +71,7 @@ # sphinx pep517==0.13.0 # via build -pip-tools==6.10.0 +pip-tools==6.11.0 # via ansible-compat (pyproject.toml) pluggy==1.0.0 # via pytest @@ -81,8 +79,6 @@ # via # ansible-pygments # sphinx -pyparsing==3.0.9 - # via packaging pyrsistent==0.19.2 # via jsonschema pytest==7.2.0 @@ -113,7 +109,7 @@ # sphinx-ansible-theme # sphinx-autobuild # sphinx-rtd-theme -sphinx-ansible-theme==0.10.0 +sphinx-ansible-theme==0.10.1 # via ansible-compat (pyproject.toml) sphinx-autobuild==2021.3.14 # via ansible-compat (pyproject.toml) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/src/ansible_compat/runtime.py new/ansible-compat-2.2.7/src/ansible_compat/runtime.py --- old/ansible-compat-2.2.6/src/ansible_compat/runtime.py 2022-11-30 21:44:11.000000000 +0100 +++ new/ansible-compat-2.2.7/src/ansible_compat/runtime.py 2022-12-09 23:51:06.000000000 +0100 @@ -273,7 +273,10 @@ def install_requirements( self, requirement: str, retry: bool = False, offline: bool = False ) -> None: - """Install dependencies from a requirements.yml.""" + """Install dependencies from a requirements.yml. + + param: offline: bypass installation, may fail if requirements are not met + """ if not os.path.exists(requirement): return reqs_yaml = yaml_from_file(requirement) @@ -295,13 +298,15 @@ if offline: _logger.warning( - "Offline mode ignored because `ansible-galaxy role install` command does not support it." + "Skipped installing old role dependencies due to running in offline mode." ) - _logger.info("Running %s", " ".join(cmd)) - result = self.exec(cmd, retry=retry) - if result.returncode != 0: - _logger.error(result.stdout) - raise AnsibleCommandError(result) + else: + _logger.info("Running %s", " ".join(cmd)) + + result = self.exec(cmd, retry=retry) + if result.returncode != 0: + _logger.error(result.stdout) + raise AnsibleCommandError(result) # Run galaxy collection install works on v2 requirements.yml if "collections" in reqs_yaml: @@ -313,21 +318,19 @@ "-v", ] if offline: - if self.version_in_range(upper="2.14"): - _logger.warning( - "Offline mode ignored because it is not supported by ansible versions before 2.14." - ) - else: - cmd.append("--offline") - cmd.extend(["-r", requirement]) - if self.cache_dir: - cmd.extend(["-p", f"{self.cache_dir}/collections"]) - _logger.info("Running %s", " ".join(cmd)) - result = self.exec(cmd, retry=retry) - if result.returncode != 0: - _logger.error(result.stdout) - _logger.error(result.stderr) - raise AnsibleCommandError(result) + _logger.warning( + "Skipped installing collection dependencies due to running in offline mode." + ) + else: + cmd.extend(["-r", requirement]) + if self.cache_dir: + cmd.extend(["-p", f"{self.cache_dir}/collections"]) + _logger.info("Running %s", " ".join(cmd)) + result = self.exec(cmd, retry=retry) + if result.returncode != 0: + _logger.error(result.stdout) + _logger.error(result.stderr) + raise AnsibleCommandError(result) def prepare_environment( # noqa: C901 self, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/src/ansible_compat.egg-info/PKG-INFO new/ansible-compat-2.2.7/src/ansible_compat.egg-info/PKG-INFO --- old/ansible-compat-2.2.6/src/ansible_compat.egg-info/PKG-INFO 2022-11-30 21:44:32.000000000 +0100 +++ new/ansible-compat-2.2.7/src/ansible_compat.egg-info/PKG-INFO 2022-12-09 23:51:26.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ansible-compat -Version: 2.2.6 +Version: 2.2.7 Summary: Ansible compatibility goodies Author-email: Sorin Sbarnea <ssbar...@redhat.com> Maintainer-email: Sorin Sbarnea <ssbar...@redhat.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/src/ansible_compat.egg-info/SOURCES.txt new/ansible-compat-2.2.7/src/ansible_compat.egg-info/SOURCES.txt --- old/ansible-compat-2.2.6/src/ansible_compat.egg-info/SOURCES.txt 2022-11-30 21:44:32.000000000 +0100 +++ new/ansible-compat-2.2.7/src/ansible_compat.egg-info/SOURCES.txt 2022-12-09 23:51:26.000000000 +0100 @@ -1,13 +1,11 @@ .flake8 .gitignore .pre-commit-config.yaml -.pylintrc .readthedocs.yml .yamllint LICENSE README.md codecov.yml -mypy.ini pyproject.toml requirements.txt tox.ini @@ -23,6 +21,7 @@ docs/examples.md docs/index.md examples/reqs_v1/requirements.yml +examples/reqs_v2/community-molecule-0.1.0.tar.gz examples/reqs_v2/requirements.yml src/ansible_compat/__init__.py src/ansible_compat/config.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/src/ansible_compat.egg-info/requires.txt new/ansible-compat-2.2.7/src/ansible_compat.egg-info/requires.txt --- old/ansible-compat-2.2.6/src/ansible_compat.egg-info/requires.txt 2022-11-30 21:44:32.000000000 +0100 +++ new/ansible-compat-2.2.7/src/ansible_compat.egg-info/requires.txt 2022-12-09 23:51:26.000000000 +0100 @@ -11,7 +11,6 @@ [test] coverage -flaky pip-tools pytest>=7.2.0 pytest-mock diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/test/test_runtime.py new/ansible-compat-2.2.7/test/test_runtime.py --- old/ansible-compat-2.2.6/test/test_runtime.py 2022-11-30 21:44:11.000000000 +0100 +++ new/ansible-compat-2.2.7/test/test_runtime.py 2022-12-09 23:51:06.000000000 +0100 @@ -10,7 +10,6 @@ import pytest from _pytest.monkeypatch import MonkeyPatch -from flaky import flaky from packaging.version import Version from pytest_mock import MockerFixture @@ -213,8 +212,6 @@ os.chdir(curdir) -# # https://github.com/box/flaky/issues/170 -@flaky(max_runs=3) # type: ignore def test_prerun_reqs_v1(caplog: pytest.LogCaptureFixture, runtime: Runtime) -> None: """Checks that the linter can auto-install requirements v1 when found.""" cwd = os.path.realpath( @@ -234,7 +231,6 @@ ) -@flaky(max_runs=3) # type: ignore def test_prerun_reqs_v2(caplog: pytest.LogCaptureFixture, runtime: Runtime) -> None: """Checks that the linter can auto-install requirements v2 when found.""" cwd = os.path.realpath( @@ -375,13 +371,13 @@ "ansible-galaxy", "collection", "install", - "containers.podman", + "examples/reqs_v2/community-molecule-0.1.0.tar.gz", "-p", "~/.ansible/collections", ] ) with pytest.raises(InvalidPrerequisiteError) as pytest_wrapped_e: - runtime.require_collection("containers.podman", "9999.9.9") + runtime.require_collection("community.molecule", "9999.9.9") assert pytest_wrapped_e.type == InvalidPrerequisiteError assert pytest_wrapped_e.value.code == INVALID_PREREQUISITES_RC @@ -439,14 +435,16 @@ def test_install_collection(runtime: Runtime) -> None: """Check that valid collection installs do not fail.""" - runtime.install_collection("containers.podman:>=1.0") + runtime.install_collection("examples/reqs_v2/community-molecule-0.1.0.tar.gz") def test_install_collection_dest(runtime: Runtime, tmp_path: pathlib.Path) -> None: """Check that valid collection to custom destination passes.""" - runtime.install_collection("containers.podman:>=1.0", destination=tmp_path) + runtime.install_collection( + "examples/reqs_v2/community-molecule-0.1.0.tar.gz", destination=tmp_path + ) expected_file = ( - tmp_path / "ansible_collections" / "containers" / "podman" / "MANIFEST.json" + tmp_path / "ansible_collections" / "community" / "molecule" / "MANIFEST.json" ) assert expected_file.is_file() @@ -454,7 +452,7 @@ def test_install_collection_fail(runtime: Runtime) -> None: """Check that invalid collection install fails.""" with pytest.raises(AnsibleCompatError) as pytest_wrapped_e: - runtime.install_collection("containers.podman:>=9999.0") + runtime.install_collection("community.molecule:>=9999.0") assert pytest_wrapped_e.type == InvalidPrerequisiteError assert pytest_wrapped_e.value.code == INVALID_PREREQUISITES_RC @@ -564,15 +562,15 @@ runtime_tmp.prepare_environment() # we install specific oudated version of a collection - runtime_tmp.install_collection("containers.podman:==1.6.0") + runtime_tmp.install_collection("examples/reqs_v2/community-molecule-0.1.0.tar.gz") with pytest.raises( InvalidPrerequisiteError, - match="Found containers.podman collection 1.6.0 but 1.6.1 or newer is required.", + match="Found community.molecule collection 0.1.0 but 9.9.9 or newer is required.", ): # we check that when install=False, we raise error - runtime_tmp.require_collection("containers.podman", "1.6.1", install=False) - # now we really perform the upgrade - runtime_tmp.require_collection("containers.podman", "1.6.1") + runtime_tmp.require_collection("community.molecule", "9.9.9", install=False) + # this should not fail, as we have this version + runtime_tmp.require_collection("community.molecule", "0.1.0") def test_require_collection_no_cache_dir() -> None: @@ -662,8 +660,7 @@ """Ensure that we can make use of offline roles.""" with remember_cwd("test/roles/acme.missing_deps"): runtime = Runtime(isolated=True) - with pytest.raises(AnsibleCommandError): - runtime.prepare_environment(install_local=True, offline=True) + runtime.prepare_environment(install_local=True, offline=True) def test_runtime_run(runtime: Runtime) -> None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/test/test_runtime_example.py new/ansible-compat-2.2.7/test/test_runtime_example.py --- old/ansible-compat-2.2.6/test/test_runtime_example.py 2022-11-30 21:44:11.000000000 +0100 +++ new/ansible-compat-2.2.7/test/test_runtime_example.py 2022-12-09 23:51:06.000000000 +0100 @@ -17,7 +17,7 @@ runtime.prepare_environment(install_local=True) # will retry 3 times if needed # Install a new collection (will retry 3 times if needed) - runtime.install_collection("containers.podman") + runtime.install_collection("examples/reqs_v2/community-molecule-0.1.0.tar.gz") # Execute a command result = runtime.exec(["ansible-doc", "--list"]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ansible-compat-2.2.6/tox.ini new/ansible-compat-2.2.7/tox.ini --- old/ansible-compat-2.2.6/tox.ini 2022-11-30 21:44:11.000000000 +0100 +++ new/ansible-compat-2.2.7/tox.ini 2022-12-09 23:51:06.000000000 +0100 @@ -79,7 +79,8 @@ skip_install = true usedevelop = false commands = - {envpython} -m pre_commit run -a --show-diff-on-failure {posargs:} + pre-commit run -a --show-diff-on-failure {posargs:} + pre-commit run -a pip-compile passenv = {[testenv]passenv} PRE_COMMIT_HOME