Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ansible-lint for openSUSE:Factory 
checked in at 2022-05-30 12:43:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ansible-lint (Old)
 and      /work/SRC/openSUSE:Factory/.ansible-lint.new.2254 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ansible-lint"

Mon May 30 12:43:48 2022 rev:3 rq:979692 version:5.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ansible-lint/ansible-lint.changes        
2022-02-15 23:58:13.440368868 +0100
+++ /work/SRC/openSUSE:Factory/.ansible-lint.new.2254/ansible-lint.changes      
2022-05-30 12:44:39.056446471 +0200
@@ -1,0 +2,5 @@
+Sun May 29 11:07:05 UTC 2022 - Sebastian Wagner <[email protected]>
+
+- Add deprecated-pytest-hook.patch to fix a test fail.
+
+-------------------------------------------------------------------

New:
----
  deprecated-pytest-hook.patch

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

Other differences:
------------------
++++++ ansible-lint.spec ++++++
--- /var/tmp/diff_new_pack.nYQaWX/_old  2022-05-30 12:44:40.752448728 +0200
+++ /var/tmp/diff_new_pack.nYQaWX/_new  2022-05-30 12:44:40.756448734 +0200
@@ -26,6 +26,7 @@
 License:        MIT
 URL:            https://github.com/ansible-community/ansible-lint
 Source0:        
https://github.com/ansible-community/ansible-lint/archive/v%{version}/ansible-lint-%{version}.tar.gz
+Patch0:         
https://github.com/ansible/ansible-lint/commit/aa6c1c6577f8178643591ddc06996a5d5588cb9a.patch#/deprecated-pytest-hook.patch
 BuildArch:      noarch
 BuildRequires:  python-rpm-macros
 BuildRequires:  python3-PyYAML
@@ -40,11 +41,11 @@
 BuildRequires:  python3-yamllint
 #BuildRequires:     git
 BuildRequires:  python3-enrich >= 1.2.6
+BuildRequires:  ansible
 BuildRequires:  python3-rich >= 9.5.1
 BuildRequires:  python3-ruamel.yaml >= 0.15.37
 BuildRequires:  python3-wcmatch >= 7.0
 # /SECTION
-BuildRequires:  ansible
 BuildRequires:  fdupes
 Requires:       ansible
 Requires:       python3-PyYAML
@@ -61,6 +62,7 @@
 
 %prep
 %setup -n ansible-lint-%{version}
+%patch0 -p1
 sed -ri 's/(\[metadata\])/\1\nversion = %{version}/' setup.cfg
 sed -i '1{/\/usr\/bin\/env python/d;}' src/ansiblelint/__main__.py
 
@@ -78,7 +80,7 @@
 %check
 # exclude some tests depending on internet access (galaxy modules)
 # exclude test_cli_auto_detect which depends on a local git repository
-# exclude test_co and test_call_from_outside_venv because of 
https://github.com/ansible-community/ansible-lint/issues/1885
+# exclude test_co and test_call_from_outside_venv because of 
https://github.com/ansible-community/ansible-lint/issues/1885 FIXED!
 PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}%{buildroot}/%{python3_sitelib} 
PATH=${PATH:+$PATH:}%{buildroot}/%{_bindir} PYTHONDONTWRITEBYTECODE=1 pytest -v 
-k 'not (test_prerun_reqs_v1 or test_prerun_reqs_v2 or test_install_collection 
or test_require_collection_wrong_version or test_cli_auto_detect or test_eco or 
test_call_from_outside_venv)'
 
 %files

++++++ deprecated-pytest-hook.patch ++++++
>From aa6c1c6577f8178643591ddc06996a5d5588cb9a Mon Sep 17 00:00:00 2001
From: Sorin Sbarnea <[email protected]>
Date: Sun, 13 Feb 2022 13:21:49 +0000
Subject: [PATCH] Remove deprecated pytest hook (#1891)

---
 conftest.py | 22 ----------------------
 tox.ini     |  1 +
 2 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/conftest.py b/conftest.py
index 303e87302..f93a957af 100644
--- a/conftest.py
+++ b/conftest.py
@@ -1,27 +1,5 @@
 """PyTest Fixtures."""
 import os
-import re
-import sys
-from typing import List
 
 os.environ["NO_COLOR"] = "1"
 pytest_plugins = ["ansiblelint.testing.fixtures"]
-
-
-def pytest_cmdline_preparse(args: List[str]) -> None:
-    """Pytest hook."""
-    # disable xdist when called with -k args (filtering)
-    # 
https://stackoverflow.com/questions/66407583/how-to-disable-pytest-xdist-only-when-pytest-is-called-with-filters
-    if "xdist" in sys.modules and "-k" in args:
-        for i, arg in enumerate(args):
-            # remove -n # option
-            if arg == "-n":
-                del args[i]
-                del args[i]
-                break
-            # remove -n# option
-            if re.match(r"-n\d+", arg):
-                del args[i]
-                break
-
-        args[:] = ["-n0"] + args
diff --git a/tox.ini b/tox.ini
index 4ffa9d99e..fb0525be6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -28,6 +28,7 @@ commands =
   {envpython} -m pytest \
   --junitxml "{toxworkdir}/junit.{envname}.xml" \
   {posargs:\
+    -n0 \
     -m "not eco" \
     -p pytest_cov \
     --cov ansiblelint \

Reply via email to