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-10-08 01:23:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ansible-compat (Old)
 and      /work/SRC/openSUSE:Factory/.python-ansible-compat.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ansible-compat"

Sat Oct  8 01:23:12 2022 rev:6 rq:1008323 version:2.2.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-ansible-compat/python-ansible-compat.changes  
    2022-08-05 19:51:03.445464401 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-ansible-compat.new.2275/python-ansible-compat.changes
    2022-10-08 01:23:16.469961242 +0200
@@ -1,0 +2,8 @@
+Sun Sep 25 12:50:57 UTC 2022 - Johannes Kastl <ka...@b1-systems.de>
+
+- update to 2.2.1:
+  * Bugfixes
+    - Avoid galaxy install failure with already symlinked collections (#166) 
@ssbarnea
+    - Avoid python warning about unknown warning category (#164) @ssbarnea
+
+-------------------------------------------------------------------

Old:
----
  ansible-compat-2.2.0.tar.gz

New:
----
  ansible-compat-2.2.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-ansible-compat.spec ++++++
--- /var/tmp/diff_new_pack.tgPfza/_old  2022-10-08 01:23:16.873962168 +0200
+++ /var/tmp/diff_new_pack.tgPfza/_new  2022-10-08 01:23:16.877962178 +0200
@@ -19,7 +19,7 @@
 # only works with the python version which the package 'ansible' uses
 %define pythons python3
 Name:           python-ansible-compat
-Version:        2.2.0
+Version:        2.2.1
 Release:        0
 Summary:        Compatibility shim for Ansible 2.9 and newer
 License:        MIT

++++++ ansible-compat-2.2.0.tar.gz -> ansible-compat-2.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansible-compat-2.2.0/.github/workflows/tox.yml 
new/ansible-compat-2.2.1/.github/workflows/tox.yml
--- old/ansible-compat-2.2.0/.github/workflows/tox.yml  2022-07-13 
19:33:17.000000000 +0200
+++ new/ansible-compat-2.2.1/.github/workflows/tox.yml  2022-09-23 
16:37:12.000000000 +0200
@@ -8,9 +8,6 @@
     branches: # any integration branch but not tag
       - "main"
   pull_request:
-  release:
-    types:
-      - published # It seems that you can publish directly without creating
   schedule:
     - cron: 1 0 * * * # Run daily at 0:01 UTC
   # Run every Friday at 18:02 UTC
@@ -20,8 +17,7 @@
 
 jobs:
   linters:
-    name: >-
-      ${{ matrix.env.TOXENV }}
+    name: ${{ matrix.env.TOXENV }}
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false
@@ -83,42 +79,40 @@
 
   unit:
     name: ${{ matrix.name || matrix.tox_env }}
-    runs-on: ${{ matrix.os }}
+    runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
     strategy:
-      # fail-fast: false
-      # max-parallel: 5
-      # The matrix testing goal is to cover the *most likely* environments
-      # which are expected to be used by users in production. Avoid adding a
-      # combination unless there are good reasons to test it, like having
-      # proof that we failed to catch a bug by not running it. Using
-      # distribution should be prefferred instead of custom builds.
+      fail-fast: false
       matrix:
         name:
           # cannot use "," in name as it will break actions/cache
           - py38
         tox_env:
-          - py38,py38-ansible29
+          - py38
         python-version:
           - "3.8"
-        os:
-          # 
https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
-          - ubuntu-20.04
-        # - windows-latest
-        # - windows-2016
         include:
           # keep list sorted as it determines UI order too
           # linux (py38 comes from matrix):
+          - name: py38-ansible29
+            tox_env: py38-ansible29
+            python-version: 3.8
+          - name: py38-ansible210
+            tox_env: py38-ansible210
+            python-version: 3.8
+          - name: py38-ansible211
+            tox_env: py38-ansible211
+            python-version: 3.8
+          - name: py38-ansible212
+            tox_env: py38-ansible212
+            python-version: 3.8
           - name: py39
             tox_env: py39,py39-devel
-            os: ubuntu-20.04
             python-version: 3.9
           - name: py310
             tox_env: py310,py310-devel
-            os: ubuntu-20.04
             python-version: "3.10"
           - name: py311
             tox_env: py311,py311-devel
-            os: ubuntu-20.04
             python-version: "~3.11.0-0" # see 
https://github.com/actions/setup-python/issues/213#issuecomment-1146676713
           # macos
           - name: py38@macos
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansible-compat-2.2.0/.pre-commit-config.yaml 
new/ansible-compat-2.2.1/.pre-commit-config.yaml
--- old/ansible-compat-2.2.0/.pre-commit-config.yaml    2022-07-13 
19:33:17.000000000 +0200
+++ new/ansible-compat-2.2.1/.pre-commit-config.yaml    2022-09-23 
16:37:12.000000000 +0200
@@ -16,7 +16,7 @@
 repos:
   - repo: https://github.com/pre-commit/mirrors-prettier
     # keep it before yamllint
-    rev: "v2.7.1"
+    rev: "v3.0.0-alpha.0"
     hooks:
       - id: prettier
         additional_dependencies:
@@ -39,15 +39,15 @@
       - id: debug-statements
         language_version: python3
   - repo: https://github.com/codespell-project/codespell
-    rev: v2.1.0
+    rev: v2.2.1
     hooks:
       - id: codespell
   - repo: https://github.com/PyCQA/doc8
-    rev: 0.11.2
+    rev: v1.0.0
     hooks:
       - id: doc8
   - repo: https://github.com/adrienverge/yamllint.git
-    rev: v1.26.3
+    rev: v1.28.0
     hooks:
       - id: yamllint
         files: \.(yaml|yml)$
@@ -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.6.0
+    rev: 22.8.0
     hooks:
       - id: black
         language_version: python3
   - repo: https://github.com/pycqa/flake8.git
-    rev: 4.0.1
+    rev: 5.0.4
     hooks:
       - id: flake8
         language_version: python3
@@ -77,7 +77,7 @@
           - flake8-rst-docstrings>=0.2.3
           - flake8-rst>=0.8.0
   - repo: https://github.com/pre-commit/mirrors-mypy
-    rev: v0.961
+    rev: v0.971
     hooks:
       - id: mypy
         # empty args needed in order to match mypy cli behavior
@@ -93,7 +93,7 @@
           - types-pkg_resources
           - types-jsonschema>=4.4.9
   - repo: https://github.com/pycqa/pylint
-    rev: v2.14.4
+    rev: v2.15.3
     hooks:
       - id: pylint
         additional_dependencies:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansible-compat-2.2.0/PKG-INFO 
new/ansible-compat-2.2.1/PKG-INFO
--- old/ansible-compat-2.2.0/PKG-INFO   2022-07-13 19:33:35.006466600 +0200
+++ new/ansible-compat-2.2.1/PKG-INFO   2022-09-23 16:37:33.406576200 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: ansible-compat
-Version: 2.2.0
+Version: 2.2.1
 Summary: Ansible compatibility goodies
 Home-page: https://github.com/ansible-community/ansible-compat
 Author: Sorin Sbarnea
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansible-compat-2.2.0/requirements.txt 
new/ansible-compat-2.2.1/requirements.txt
--- old/ansible-compat-2.2.0/requirements.txt   2022-07-13 19:33:17.000000000 
+0200
+++ new/ansible-compat-2.2.1/requirements.txt   2022-09-23 16:37:12.000000000 
+0200
@@ -10,23 +10,23 @@
     # via sphinx-ansible-theme
 argh==0.26.2
     # via sphinx-autobuild
-attrs==21.4.0
+attrs==22.1.0
     # via
     #   jsonschema
     #   pytest
-babel==2.10.1
+babel==2.10.3
     # via sphinx
 build==0.8.0
     # via pip-tools
-certifi==2022.5.18.1
+certifi==2022.9.14
     # via requests
-charset-normalizer==2.0.12
+charset-normalizer==2.1.1
     # via requests
 click==8.1.3
     # via pip-tools
 commonmark==0.9.1
     # via pytest-markdown
-coverage==6.3.3
+coverage==6.4.4
     # via ansible-compat (setup.cfg)
 docutils==0.17.1
     # via
@@ -35,11 +35,11 @@
     #   sphinx-rtd-theme
 flaky==3.7.0
     # via ansible-compat (setup.cfg)
-idna==3.3
+idna==3.4
     # via requests
-imagesize==1.3.0
+imagesize==1.4.1
     # via sphinx
-importlib-metadata==4.11.3
+importlib-metadata==4.12.0
     # via sphinx
 iniconfig==1.1.1
     # via pytest
@@ -47,7 +47,7 @@
     # via
     #   myst-parser
     #   sphinx
-jsonschema==4.6.0
+jsonschema==4.16.0
     # via ansible-compat (setup.cfg)
 livereload==2.6.3
     # via sphinx-autobuild
@@ -59,11 +59,11 @@
     # via jinja2
 mdit-py-plugins==0.3.0
     # via myst-parser
-mdurl==0.1.1
+mdurl==0.1.2
     # via markdown-it-py
-more-itertools==8.13.0
+more-itertools==8.14.0
     # via pytest-plus
-myst-parser==0.17.2
+myst-parser==0.18.0
     # via ansible-compat (setup.cfg)
 packaging==21.3
     # via
@@ -72,7 +72,7 @@
     #   sphinx
 pathtools==0.1.2
     # via sphinx-autobuild
-pep517==0.12.0
+pep517==0.13.0
     # via build
 pip-tools==6.8.0
     # via ansible-compat (setup.cfg)
@@ -82,7 +82,7 @@
     # via sphinx-autobuild
 py==1.11.0
     # via pytest
-pygments==2.12.0
+pygments==2.13.0
     # via
     #   ansible-pygments
     #   sphinx
@@ -98,18 +98,18 @@
     #   pytest-plus
 pytest-markdown==1.0.2
     # via ansible-compat (setup.cfg)
-pytest-mock==3.7.0
+pytest-mock==3.8.2
     # via ansible-compat (setup.cfg)
 pytest-plus==0.2
     # via ansible-compat (setup.cfg)
-pytz==2022.1
+pytz==2022.2.1
     # via babel
 pyyaml==6.0
     # via
     #   ansible-compat (setup.cfg)
     #   myst-parser
     #   sphinx-autobuild
-requests==2.27.1
+requests==2.28.1
     # via sphinx
 six==1.16.0
     # via livereload
@@ -147,19 +147,19 @@
     # via
     #   build
     #   pep517
-tornado==6.1
+tornado==6.2
     # via
     #   livereload
     #   sphinx-autobuild
-typing-extensions==4.2.0
+typing-extensions==4.3.0
     # via myst-parser
-urllib3==1.26.9
+urllib3==1.26.12
     # via requests
-watchdog==2.1.8
+watchdog==2.1.9
     # via sphinx-autobuild
 wheel==0.37.1
     # via pip-tools
-zipp==3.8.0
+zipp==3.8.1
     # via importlib-metadata
 
 # The following packages are considered to be unsafe in a requirements file:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansible-compat-2.2.0/src/ansible_compat/loaders.py 
new/ansible-compat-2.2.1/src/ansible_compat/loaders.py
--- old/ansible-compat-2.2.0/src/ansible_compat/loaders.py      2022-07-13 
19:33:17.000000000 +0200
+++ new/ansible-compat-2.2.1/src/ansible_compat/loaders.py      2022-09-23 
16:37:12.000000000 +0200
@@ -1,10 +1,29 @@
 """Utilities for loading various files."""
+from __future__ import annotations
+
+import os
 from typing import Any
 
 import yaml
 
+from ansible_compat.errors import InvalidPrerequisiteError
+
 
 def yaml_from_file(filepath: str) -> Any:
     """Return a loaded YAML file."""
     with open(filepath, encoding="utf-8") as content:
         return yaml.load(content, Loader=yaml.FullLoader)
+
+
+def colpath_from_path(filepath: str) -> str | None:
+    """Return a FQCN from a path."""
+    galaxy_file = f"{filepath}/galaxy.yml"
+    if os.path.exists(galaxy_file):
+        galaxy = yaml_from_file(galaxy_file)
+        for k in ("namespace", "name"):
+            if k not in galaxy:
+                raise InvalidPrerequisiteError(
+                    f"{galaxy_file} is missing the following mandatory field 
{k}"
+                )
+        return f"{galaxy['namespace']}/{galaxy['name']}"
+    return None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansible-compat-2.2.0/src/ansible_compat/runtime.py 
new/ansible-compat-2.2.1/src/ansible_compat/runtime.py
--- old/ansible-compat-2.2.0/src/ansible_compat/runtime.py      2022-07-13 
19:33:17.000000000 +0200
+++ new/ansible-compat-2.2.1/src/ansible_compat/runtime.py      2022-09-23 
16:37:12.000000000 +0200
@@ -26,7 +26,7 @@
     InvalidPrerequisiteError,
     MissingAnsibleError,
 )
-from ansible_compat.loaders import yaml_from_file
+from ansible_compat.loaders import colpath_from_path, yaml_from_file
 from ansible_compat.prerun import get_cache_dir
 
 if TYPE_CHECKING:
@@ -85,8 +85,11 @@
         # Reduce noise from paramiko, unless user already defined 
PYTHONWARNINGS
         # paramiko/transport.py:236: CryptographyDeprecationWarning: Blowfish 
has been deprecated
         # https://github.com/paramiko/paramiko/issues/2038
+        # As CryptographyDeprecationWarning is not a builtin, we cannot use
+        # PYTHONWARNINGS to ignore it using category but we can use message.
+        # https://stackoverflow.com/q/68251969/99834
         if "PYTHONWARNINGS" not in self.environ:
-            self.environ["PYTHONWARNINGS"] = 
"ignore::CryptographyDeprecationWarning"
+            self.environ["PYTHONWARNINGS"] = "ignore:Blowfish has been 
deprecated"
 
         if isolated:
             self.cache_dir = get_cache_dir(self.project_dir)
@@ -312,7 +315,7 @@
                 _logger.error(run.stdout)
                 raise AnsibleCommandError(run)
 
-    def prepare_environment(
+    def prepare_environment(  # noqa: C901
         self,
         required_collections: Optional[Dict[str, str]] = None,
         retry: bool = False,
@@ -349,6 +352,21 @@
             return
 
         if os.path.exists("galaxy.yml"):
+            if destination:
+                # while function can return None, that would not break the 
logic
+                colpath = 
f"{destination}/ansible_collections/{colpath_from_path(os.getcwd())}"
+                if os.path.islink(colpath):
+                    if os.path.realpath(colpath) == os.getcwd():
+                        _logger.warning(
+                            "Found symlinked collection, skipping its 
installation."
+                        )
+                        return
+                    _logger.warning(
+                        "Collection is symlinked, but not pointing to %s 
directory, so we will remove it.",
+                        os.getcwd(),
+                    )
+                    os.unlink(colpath)
+
             # molecule scenario within a collection
             self.install_collection_from_disk(".", destination=destination)
         elif pathlib.Path().resolve().parent.name == "roles" and 
os.path.exists(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ansible-compat-2.2.0/src/ansible_compat.egg-info/PKG-INFO 
new/ansible-compat-2.2.1/src/ansible_compat.egg-info/PKG-INFO
--- old/ansible-compat-2.2.0/src/ansible_compat.egg-info/PKG-INFO       
2022-07-13 19:33:34.000000000 +0200
+++ new/ansible-compat-2.2.1/src/ansible_compat.egg-info/PKG-INFO       
2022-09-23 16:37:33.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: ansible-compat
-Version: 2.2.0
+Version: 2.2.1
 Summary: Ansible compatibility goodies
 Home-page: https://github.com/ansible-community/ansible-compat
 Author: Sorin Sbarnea
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansible-compat-2.2.0/test/test_runtime.py 
new/ansible-compat-2.2.1/test/test_runtime.py
--- old/ansible-compat-2.2.0/test/test_runtime.py       2022-07-13 
19:33:17.000000000 +0200
+++ new/ansible-compat-2.2.1/test/test_runtime.py       2022-09-23 
16:37:12.000000000 +0200
@@ -466,7 +466,7 @@
     pathlib.Path(f"{runtime_tmp.project_dir}/meta/main.yml").touch()
     # this should only raise a warning
     runtime_tmp._install_galaxy_role(runtime_tmp.project_dir, 
role_name_check=1)
-    # this shoul test the bypass role name check path
+    # this should test the bypass role name check path
     runtime_tmp._install_galaxy_role(runtime_tmp.project_dir, 
role_name_check=2)
     # this should raise an error
     with pytest.raises(
@@ -643,16 +643,19 @@
     """Tests that we fail to install a broken collection."""
     with remember_cwd("test/collections/acme.broken"):
         runtime = Runtime(isolated=True)
-        exception: Type[Exception]
-        if runtime.version_in_range(upper="2.11"):
-            exception = AnsibleCommandError
-            msg = "Got 1 exit code while running: ansible-galaxy collection 
build"
-        else:
-            exception = InvalidPrerequisiteError
-            msg = "is missing the following mandatory"
-        with pytest.raises(exception, match=msg):
-            # this should call install_collection_from_disk(".")
+        with pytest.raises(RuntimeError) as exc_info:
             runtime.prepare_environment(install_local=True)
+        # based on version of Ansible used, we might get a different error,
+        # but both errors should be considered acceptable
+        assert exc_info.type in (
+            RuntimeError,
+            AnsibleCompatError,
+            AnsibleCommandError,
+            InvalidPrerequisiteError,
+        )
+        assert exc_info.match(
+            "(is missing the following mandatory|Got 1 exit code while 
running: ansible-galaxy collection build)"
+        )
 
 
 def test_prepare_environment_offline_role() -> None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ansible-compat-2.2.0/tox.ini 
new/ansible-compat-2.2.1/tox.ini
--- old/ansible-compat-2.2.0/tox.ini    2022-07-13 19:33:17.000000000 +0200
+++ new/ansible-compat-2.2.1/tox.ini    2022-09-23 16:37:12.000000000 +0200
@@ -22,16 +22,18 @@
   devel: ansible devel branch
   ansible29: ansible 2.9
   ansible210: ansible-base 2.10
+  ansible211: ansible-base 2.11
   ansible212: ansible-core 2.12
-  ansible213: ansible-core 2.12
+  ansible213: ansible-core 2.13
 deps =
   ansible29: ansible>=2.9,<2.10
   ansible210: ansible-base>=2.10,<2.11
+  ansible211: ansible-core>=2.11,<2.12
   ansible212: ansible-core>=2.12,<2.13
   ansible213: ansible-core>=2.13,<2.14
   devel: ansible-core @ git+https://github.com/ansible/ansible.git  # GPLv3+
-  # avoid installing ansible-core on -devel and on ansible29 envs:
-  !devel-!ansible29: ansible-core
+  # avoid installing ansible-core on -devel, ansible29 and ansible210 envs:
+  !devel-!ansible29-!ansible210: ansible-core
   --editable .[test]
 
 commands =
@@ -80,6 +82,9 @@
 passenv =
   {[testenv]passenv}
   PRE_COMMIT_HOME
+setenv =
+  {[testenv]setenv}
+  PIP_CONSTRAINT = /dev/null
 
 [testenv:deps]
 description = Bump all test dependencies

Reply via email to