Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-relaxed for
openSUSE:Factory checked in at 2022-03-13 20:25:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-relaxed (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-relaxed.new.25692 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-relaxed"
Sun Mar 13 20:25:09 2022 rev:9 rq:960645 version:1.1.5
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-relaxed/python-pytest-relaxed.changes
2021-12-30 15:55:39.564665593 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-relaxed.new.25692/python-pytest-relaxed.changes
2022-03-13 20:25:28.055676550 +0100
@@ -1,0 +2,7 @@
+Thu Mar 10 06:05:48 UTC 2022 - Steve Kowalik <[email protected]>
+
+- Add patch no-makeitem-method.patch:
+ * Support pytest > 6.1
+- No longer skip python310.
+
+-------------------------------------------------------------------
New:
----
no-makeitem-method.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-relaxed.spec ++++++
--- /var/tmp/diff_new_pack.2WLWJr/_old 2022-03-13 20:25:28.519677096 +0100
+++ /var/tmp/diff_new_pack.2WLWJr/_new 2022-03-13 20:25:28.527677105 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-relaxed
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,6 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%define skip_python310 1
Name: python-pytest-relaxed
Version: 1.1.5
Release: 0
@@ -26,15 +25,16 @@
URL: https://github.com/bitprophet/pytest-relaxed
Source:
https://files.pythonhosted.org/packages/source/p/pytest-relaxed/pytest-relaxed-%{version}.tar.gz
Patch0:
https://github.com/bitprophet/pytest-relaxed/pull/10.patch#/pytest-relaxed-pr10.patch
+# PATCH-FIX-UPSTREAM gh#bitprophet/pytest-relaxed#21
+Patch1: no-makeitem-method.patch
BuildRequires: %{python_module decorator >= 4}
-# gh#bitprophet/pytest-relaxed#12
-BuildRequires: %{python_module pytest < 6.1}
+BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-decorator >= 4
-Requires: python-pytest < 6.1
+Requires: python-pytest
Requires: python-six
BuildArch: noarch
%python_subpackages
@@ -43,12 +43,11 @@
Relaxed test discovery/organization plugin for pytest from python-paramiko
author
%prep
-%setup -q -n pytest-relaxed-%{version}
+%autosetup -p1 -n pytest-relaxed-%{version}
# do not hardcode deps
sed -i setup.py \
-e 's:pytest>=3,<5:pytest>=3:' \
-e 's:decorator>=4,<5:decorator>=4:'
-%patch0 -p1
%build
export LANG=en_US.UTF-8
++++++ no-makeitem-method.patch ++++++
Index: pytest-relaxed-1.1.5/pytest_relaxed/classes.py
===================================================================
--- pytest-relaxed-1.1.5.orig/pytest_relaxed/classes.py
+++ pytest-relaxed-1.1.5/pytest_relaxed/classes.py
@@ -179,23 +179,15 @@ class SpecInstance(RelaxedMixin, Instanc
setattr(obj, name, value)
return obj
- # Stub for pytest >=3.0,<3.3 where _makeitem did not exist
- def makeitem(self, *args, **kwargs):
- return self._makeitem(*args, **kwargs)
-
- def _makeitem(self, name, obj):
- # More pytestmark skipping.
- if name == "pytestmark":
- return
- # NOTE: no need to modify collect() this time, just mutate item
- # creation. TODO: but if collect() is still public, let's move to that
- # sometime, if that'll work as well.
- superb = super(SpecInstance, self)
- attr = "_makeitem" if hasattr(superb, "_makeitem") else "makeitem"
- item = getattr(superb, attr)(name, obj)
- # Replace any Class objects with SpecClass; this will automatically
- # recurse.
- # TODO: can we unify this with SpecModule's same bits?
- if isinstance(item, Class):
- item = SpecClass.from_parent(item.parent, name=item.name)
- return item
+ def collect(self):
+ items = super(SpecInstance, self).collect()
+ collected = []
+ for item in items:
+ # Replace any Class objects with SpecClass, and recurse into it.
+ if isinstance(item, Class):
+ cls = SpecClass.from_parent(item.parent, name=item.name)
+ for item in cls.collect():
+ collected.append(item)
+ else:
+ collected.append(item)
+ return collected