Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pylama for openSUSE:Factory 
checked in at 2021-03-17 20:13:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pylama (Old)
 and      /work/SRC/openSUSE:Factory/.python-pylama.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pylama"

Wed Mar 17 20:13:58 2021 rev:7 rq:879331 version:7.7.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pylama/python-pylama.changes      
2020-12-12 20:31:35.129803282 +0100
+++ /work/SRC/openSUSE:Factory/.python-pylama.new.2401/python-pylama.changes    
2021-03-17 20:15:11.434926786 +0100
@@ -1,0 +2,5 @@
+Tue Mar 16 04:12:39 UTC 2021 - Steve Kowalik <[email protected]>
+
+- Add support-pytest-6.patch to support running with pytest >= 6. 
+
+-------------------------------------------------------------------

New:
----
  support-pytest-6.patch

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

Other differences:
------------------
++++++ python-pylama.spec ++++++
--- /var/tmp/diff_new_pack.EhSlUO/_old  2021-03-17 20:15:12.050927628 +0100
+++ /var/tmp/diff_new_pack.EhSlUO/_new  2021-03-17 20:15:12.054927634 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pylama
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,6 +27,8 @@
 Source:         
https://files.pythonhosted.org/packages/source/p/pylama/pylama-%{version}.tar.gz
 # https://github.com/klen/pylama/issues/147
 Source1:        https://raw.githubusercontent.com/klen/pylama/develop/dummy.py
+# PATCH-FIX-UPSTREAM support-pytest-6.patch gh#klen/pylama#189
+Patch0:         support-pytest-6.patch
 BuildRequires:  %{python_module eradicate >= 0.2}
 BuildRequires:  %{python_module mccabe >= 0.5.2}
 BuildRequires:  %{python_module pycodestyle >= 2.3.1}
@@ -42,7 +44,7 @@
 BuildRequires:  python-rpm-macros
 Requires:       python-setuptools
 Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
 Recommends:     mypy
 Recommends:     python-mccabe >= 0.5.2
 Recommends:     python-pycodestyle >= 2.3.1
@@ -63,6 +65,7 @@
 %prep
 %setup -q -n pylama-%{version}
 cp %{SOURCE1} .
+%autopatch -p1
 
 %build
 export LANG=en_US.UTF-8

++++++ support-pytest-6.patch ++++++
>From 84cbc4cabd88f280eecbdaa51b692812be067417 Mon Sep 17 00:00:00 2001
From: ubaumann <[email protected]>
Date: Sun, 2 Aug 2020 18:31:04 +0200
Subject: [PATCH] Changed to use named constructor 'from_parent'

Fix for pytest 6.0.0

https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent
---
 pylama/pytest.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pylama/pytest.py b/pylama/pytest.py
index e6f6ec1..cb89a69 100644
--- a/pylama/pytest.py
+++ b/pylama/pytest.py
@@ -40,6 +40,8 @@ def pytest_sessionfinish(session):
 def pytest_collect_file(path, parent):
     config = parent.config
     if config.option.pylama and path.ext == '.py':
+        if hasattr(PylamaItem, "from_parent"):
+            return PylamaItem.from_parent(parent=parent, path=path, 
fspath=path)
         return PylamaItem(path, parent)
 
 
@@ -49,7 +51,7 @@ class PylamaError(Exception):
 
 class PylamaItem(pytest.Item, pytest.File):
 
-    def __init__(self, path, parent):
+    def __init__(self, path, parent, fspath=None):
         super(PylamaItem, self).__init__(path, parent)
         self.add_marker("pycodestyle")
         self.cache = None

Reply via email to