diff --git a/Iterable-collections.patch b/Iterable-collections.patch new file mode 100644 index 0000000..59ca447 --- /dev/null +++ b/Iterable-collections.patch @@ -0,0 +1,15 @@ +--- + pytest_verbose_parametrize.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/pytest_verbose_parametrize.py ++++ b/pytest_verbose_parametrize.py +@@ -1,4 +1,7 @@ +-from collections import Iterable ++try: ++ from collections.abc import Iterable ++except (ImportError, ModuleNotFoundError): ++ from collections import Iterable + from six import string_types, text_type + + diff --git a/python-pytest-verbose-parametrize.changes b/python-pytest-verbose-parametrize.changes index 958f0b3..3b43af6 100644 --- a/python-pytest-verbose-parametrize.changes +++ b/python-pytest-verbose-parametrize.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 10 16:09:01 UTC 2022 - Matej Cepl + +- Add Iterable-collections.patch to avoid Python 3.10 + incompatibility (gh#man-group/pytest-plugins#197). + ------------------------------------------------------------------- Thu Aug 22 09:05:47 UTC 2019 - Tomáš Chvátal diff --git a/python-pytest-verbose-parametrize.spec b/python-pytest-verbose-parametrize.spec index 7f4ca80..d3138d8 100644 --- a/python-pytest-verbose-parametrize.spec +++ b/python-pytest-verbose-parametrize.spec @@ -1,7 +1,7 @@ # # spec file for package python-pytest-verbose-parametrize # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# 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 @@ -25,6 +25,10 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/manahl/pytest-plugins Source: https://files.pythonhosted.org/packages/source/p/pytest-verbose-parametrize/pytest-verbose-parametrize-%{version}.tar.gz +# PATCH-FIX-UPSTREAM Iterable-collections.patch gh#man-group/pytest-plugins#197 mcepl@suse.com +# Python 3.10 finally really killed collections class, which are now in +# collections.abc +Patch0: Iterable-collections.patch BuildRequires: %{python_module setuptools-git} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -46,6 +50,8 @@ More descriptive output for parametrized py.test tests. %prep %setup -q -n pytest-verbose-parametrize-%{version} +%autopatch -p1 + # we can't do integration tests as py2 and py3 can be different versions # and the script simply calls $bindir/pytest rm tests/integration/test_verbose_parametrize.py