Hello community, here is the log from the commit of package python-wrapt for openSUSE:Factory checked in at 2020-12-05 20:35:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-wrapt (Old) and /work/SRC/openSUSE:Factory/.python-wrapt.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-wrapt" Sat Dec 5 20:35:33 2020 rev:11 rq:853084 version:1.12.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-wrapt/python-wrapt.changes 2020-03-27 00:26:06.152281274 +0100 +++ /work/SRC/openSUSE:Factory/.python-wrapt.new.5913/python-wrapt.changes 2020-12-05 20:35:39.122615579 +0100 @@ -1,0 +2,7 @@ +Fri Dec 4 00:37:53 UTC 2020 - Benjamin Greiner <c...@bnavigator.de> + +- Fix python3.6 build with pytest 6 + * fix-dummy-collector-pytest6.patch + * gh#GrahamDumpleton/wrapt#168 + +------------------------------------------------------------------- New: ---- fix-dummy-collector-pytest6.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-wrapt.spec ++++++ --- /var/tmp/diff_new_pack.TTcc2G/_old 2020-12-05 20:35:40.622617101 +0100 +++ /var/tmp/diff_new_pack.TTcc2G/_new 2020-12-05 20:35:40.622617101 +0100 @@ -26,6 +26,8 @@ Group: Development/Languages/Python URL: https://github.com/GrahamDumpleton/wrapt Source: https://github.com/GrahamDumpleton/wrapt/archive/%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh#GrahamDumpleton/wrapt#168 -- fix pytest 6 dummy collection +Patch0: https://github.com/GrahamDumpleton/wrapt/pull/168.patch#/fix-dummy-collector-pytest6.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} @@ -59,6 +61,7 @@ %prep %setup -q -n wrapt-%{version} +%patch0 -p1 %build export CFLAGS="%{optflags}" ++++++ fix-dummy-collector-pytest6.patch ++++++ From abb18d6f52a0fd22de209f5d02f4d5c66656a26a Mon Sep 17 00:00:00 2001 From: Ben Greiner <c...@bnavigator.de> Date: Fri, 4 Dec 2020 01:24:34 +0100 Subject: [PATCH] fix dummycollector for pytest >= 6 --- tests/conftest.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index e37790f..9e9e35b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,18 +2,30 @@ import pytest +try: + from pytest import File as FileCollector +except ImportError: + from pytest.collect import File as FileCollector + version = tuple(sys.version_info[:2]) -class DummyCollector(pytest.collect.File): +class DummyCollector(FileCollector): def collect(self): return [] +def construct_dummy(path, parent): + if hasattr(DummyCollector, "from_parent"): + item = DummyCollector.from_parent(parent, fspath=path) + return item + else: + return DummyCollector(path, parent=parent) + def pytest_pycollect_makemodule(path, parent): if '_py33' in path.basename and version < (3, 3): - return DummyCollector(path, parent=parent) + return construct_dummy(path, parent) if '_py37' in path.basename and version < (3, 7): - return DummyCollector(path, parent=parent) + return construct_dummy(path, parent) if '_py3' in path.basename and version < (3, 0): - return DummyCollector(path, parent=parent) + return construct_dummy(path, parent) if '_py2' in path.basename and version >= (3, 0): - return DummyCollector(path, parent=parent) + return construct_dummy(path, parent) _______________________________________________ openSUSE Commits mailing list -- commit@lists.opensuse.org To unsubscribe, email commit-le...@lists.opensuse.org List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/commit@lists.opensuse.org