From 094ae3750726e6efcc16c36755f50daa9ad99378e38d66f8514ad49a53b179b0 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Fri, 9 Dec 2022 10:57:47 +0000 Subject: [PATCH] Accepting request 1041635 from home:pgajdos:python - do not require six - added patches fix https://github.com/man-group/pytest-plugins/issues/209 + python-pytest-verbose-parametrize-no-six.patch OBS-URL: https://build.opensuse.org/request/show/1041635 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-verbose-parametrize?expand=0&rev=12 --- ...on-pytest-verbose-parametrize-no-six.patch | 29 +++++++++++++++++++ python-pytest-verbose-parametrize.changes | 8 +++++ python-pytest-verbose-parametrize.spec | 4 +-- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 python-pytest-verbose-parametrize-no-six.patch diff --git a/python-pytest-verbose-parametrize-no-six.patch b/python-pytest-verbose-parametrize-no-six.patch new file mode 100644 index 0000000..7ca7d7c --- /dev/null +++ b/python-pytest-verbose-parametrize-no-six.patch @@ -0,0 +1,29 @@ +Index: pytest-verbose-parametrize-1.7.0/pytest_verbose_parametrize.py +=================================================================== +--- pytest-verbose-parametrize-1.7.0.orig/pytest_verbose_parametrize.py ++++ pytest-verbose-parametrize-1.7.0/pytest_verbose_parametrize.py +@@ -4,14 +4,13 @@ except ImportError: + from collections import Iterable + except ModuleNotFoundError: + from collections import Iterable +-from six import string_types, text_type + + + def _strize_arg(arg): + try: + s = arg.__name__ + except AttributeError: +- s = text_type(arg) ++ s = str(arg) + if len(s) > 32: + s = s[:29] + '...' + return s +@@ -34,7 +33,7 @@ def pytest_generate_tests(metafunc): + if 'ids' not in markers.kwargs: + list_names = [] + for i, argvalue in enumerate(markers.args[1]): +- if (not isinstance(argvalue, Iterable)) or isinstance(argvalue, string_types): ++ if (not isinstance(argvalue, Iterable)) or isinstance(argvalue, str): + argvalue = (argvalue,) + name = '-'.join(_strize_arg(arg) for arg in argvalue) + if len(name) > 64: diff --git a/python-pytest-verbose-parametrize.changes b/python-pytest-verbose-parametrize.changes index 4ccba4d..e7852fe 100644 --- a/python-pytest-verbose-parametrize.changes +++ b/python-pytest-verbose-parametrize.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Dec 8 13:18:34 UTC 2022 - pgajdos@suse.com + +- do not require six +- added patches + fix https://github.com/man-group/pytest-plugins/issues/209 + + python-pytest-verbose-parametrize-no-six.patch + ------------------------------------------------------------------- Thu Apr 21 20:58:14 UTC 2022 - Ben Greiner diff --git a/python-pytest-verbose-parametrize.spec b/python-pytest-verbose-parametrize.spec index 3352056..a410e3b 100644 --- a/python-pytest-verbose-parametrize.spec +++ b/python-pytest-verbose-parametrize.spec @@ -31,18 +31,18 @@ Source: https://files.pythonhosted.org/packages/source/p/pytest-verbose- Patch0: Iterable-collections.patch # PATCH-FEATURE-UPSTREAM pytest-fixtures-pr171-remove-mock.patch -- gh#man-group#pytest-plugins#171 Patch1: pytest-fixtures-pr171-remove-mock.patch +# https://github.com/man-group/pytest-plugins/issues/209 +Patch2: python-pytest-verbose-parametrize-no-six.patch BuildRequires: %{python_module setuptools-git} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pytest -Requires: python-six BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module coverage} BuildRequires: %{python_module pytest-virtualenv} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module six} %if %{with python2} BuildRequires: python2-mock %endif