Hello community,
here is the log from the commit of package python-pytest-forked for
openSUSE:Factory checked in at 2020-05-28 09:05:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-forked (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-forked.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-forked"
Thu May 28 09:05:25 2020 rev:4 rq:803983 version:1.1.3
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-forked/python-pytest-forked.changes
2019-11-22 10:19:58.981352298 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-forked.new.3606/python-pytest-forked.changes
2020-05-28 09:05:28.535367329 +0200
@@ -1,0 +2,6 @@
+Tue May 12 22:51:08 UTC 2020 - Matej Cepl <[email protected]>
+
+- Add pytest5-compat.patch to make the test suite compatible
+ with pytest 5.4.0+ (gh#pytest-dev/pytest-forked#32)
+
+-------------------------------------------------------------------
New:
----
pytest5-compat.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-forked.spec ++++++
--- /var/tmp/diff_new_pack.xfXO2a/_old 2020-05-28 09:05:29.647370663 +0200
+++ /var/tmp/diff_new_pack.xfXO2a/_new 2020-05-28 09:05:29.647370663 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-forked
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,9 @@
License: MIT
URL: https://github.com/pytest-dev/pytest-forked
Source:
https://files.pythonhosted.org/packages/source/p/pytest-forked/pytest-forked-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM pytest5-compat.patch gh#pytest-dev/pytest-forked#30
[email protected]
+# makes the test suite compatible with pytest5.4.0+
+Patch0: pytest5-compat.patch
BuildRequires: %{python_module pytest >= 3.1.0}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
@@ -38,6 +41,7 @@
%prep
%setup -q -n pytest-forked-%{version}
+%autopatch -p1
%build
%python_build
++++++ pytest5-compat.patch ++++++
>From 1eb5791e005c0d17622c53d5c3158b5b899e147e Mon Sep 17 00:00:00 2001
From: Stanislav Levin <[email protected]>
Date: Thu, 7 May 2020 14:40:19 +0300
Subject: [PATCH] Add compatibility with Pytest 5.4.0+
'getfslineno' has been removed from 'compat' in Pytest [0].
However, that function was just the wrapper of
'_pytest._code.source.getfslineno'. The latter exists in Pytest
since, at least, 3.0.0.
[0]: https://github.com/pytest-dev/pytest/commit/9c7f1d9b3.
Fixes: https://github.com/pytest-dev/pytest-forked/issues/30
Signed-off-by: Stanislav Levin <[email protected]>
---
src/pytest_forked/__init__.py | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/pytest_forked/__init__.py b/src/pytest_forked/__init__.py
index fa0600d..886c4c8 100644
--- a/src/pytest_forked/__init__.py
+++ b/src/pytest_forked/__init__.py
@@ -71,13 +71,8 @@ def runforked():
def report_process_crash(item, result):
- try:
- from _pytest.compat import getfslineno
- except ImportError:
- # pytest<4.2
- path, lineno = item._getfslineno()
- else:
- path, lineno = getfslineno(item)
+ from _pytest._code.source import getfslineno
+ path, lineno = getfslineno(item)
info = ("%s:%s: running the test CRASHED with signal %d" %
(path, lineno, result.signal))
from _pytest import runner