From 31f64db3e36726dd7819c9e370a051cceca0c12db26b3818b39b51bf026aa4e3 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 22 Oct 2024 06:11:29 +0000 Subject: [PATCH] - Update to 1.8.0: * Drop support for Python 2 and <3.6, removing compatibility code. * Use stdlib unittest.mock instead of mock package. * Removed usage of path.py and path in favour of pathlib. - Removed patches, included upstream: * Iterable-collections.patch * pytest-fixtures-pr171-remove-mock.patch - Refreshed python-pytest-verbose-parametrize-no-six.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-verbose-parametrize?expand=0&rev=14 --- Iterable-collections.patch | 17 --------- pytest-fixtures-pr171-remove-mock.patch | 14 ------- pytest-verbose-parametrize-1.7.0.tar.gz | 3 -- pytest-verbose-parametrize-1.8.0.tar.gz | 3 ++ ...on-pytest-verbose-parametrize-no-six.patch | 26 +++++++++---- python-pytest-verbose-parametrize.changes | 12 ++++++ python-pytest-verbose-parametrize.spec | 37 ++++++------------- 7 files changed, 45 insertions(+), 67 deletions(-) delete mode 100644 Iterable-collections.patch delete mode 100644 pytest-fixtures-pr171-remove-mock.patch delete mode 100644 pytest-verbose-parametrize-1.7.0.tar.gz create mode 100644 pytest-verbose-parametrize-1.8.0.tar.gz diff --git a/Iterable-collections.patch b/Iterable-collections.patch deleted file mode 100644 index 4cdc68e..0000000 --- a/Iterable-collections.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - 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,9 @@ --from collections import Iterable -+try: -+ from collections.abc import Iterable -+except ImportError: -+ from collections import Iterable -+except ModuleNotFoundError: -+ from collections import Iterable - from six import string_types, text_type - - diff --git a/pytest-fixtures-pr171-remove-mock.patch b/pytest-fixtures-pr171-remove-mock.patch deleted file mode 100644 index de35de1..0000000 --- a/pytest-fixtures-pr171-remove-mock.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/pytest-verbose-parametrize/tests/unit/test_verbose_parametrize.py b/pytest-verbose-parametrize/tests/unit/test_verbose_parametrize.py -index fcce01d..bba9aa6 100644 ---- pytest-verbose-parametrize/tests/unit/test_verbose_parametrize.py -+++ pytest-verbose-parametrize.patched/tests/unit/test_verbose_parametrize.py -@@ -1,5 +1,8 @@ - # -*- coding: utf-8 -*- --from mock import Mock -+try: -+ from unittest.mock import Mock -+except ImportError: -+ from mock import Mock - - from pytest_verbose_parametrize import pytest_generate_tests - diff --git a/pytest-verbose-parametrize-1.7.0.tar.gz b/pytest-verbose-parametrize-1.7.0.tar.gz deleted file mode 100644 index 99b7566..0000000 --- a/pytest-verbose-parametrize-1.7.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b85b374a5747607a8e9ffca9732e152859b8e7115bcb10f25c31c60d403146e8 -size 12301 diff --git a/pytest-verbose-parametrize-1.8.0.tar.gz b/pytest-verbose-parametrize-1.8.0.tar.gz new file mode 100644 index 0000000..8c1a047 --- /dev/null +++ b/pytest-verbose-parametrize-1.8.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05dfd556c446159c366b88e196676321f48a6d92ad6465bae69758dd603db0a5 +size 30768 diff --git a/python-pytest-verbose-parametrize-no-six.patch b/python-pytest-verbose-parametrize-no-six.patch index 7ca7d7c..d962c0d 100644 --- a/python-pytest-verbose-parametrize-no-six.patch +++ b/python-pytest-verbose-parametrize-no-six.patch @@ -1,11 +1,9 @@ -Index: pytest-verbose-parametrize-1.7.0/pytest_verbose_parametrize.py +Index: pytest-verbose-parametrize-1.8.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 +--- pytest-verbose-parametrize-1.8.0.orig/pytest_verbose_parametrize.py ++++ pytest-verbose-parametrize-1.8.0/pytest_verbose_parametrize.py +@@ -1,12 +1,11 @@ + from collections.abc import Iterable -from six import string_types, text_type @@ -18,7 +16,7 @@ Index: pytest-verbose-parametrize-1.7.0/pytest_verbose_parametrize.py if len(s) > 32: s = s[:29] + '...' return s -@@ -34,7 +33,7 @@ def pytest_generate_tests(metafunc): +@@ -29,7 +28,7 @@ def pytest_generate_tests(metafunc): if 'ids' not in markers.kwargs: list_names = [] for i, argvalue in enumerate(markers.args[1]): @@ -27,3 +25,15 @@ Index: pytest-verbose-parametrize-1.7.0/pytest_verbose_parametrize.py argvalue = (argvalue,) name = '-'.join(_strize_arg(arg) for arg in argvalue) if len(name) > 64: +Index: pytest-verbose-parametrize-1.8.0/setup.py +=================================================================== +--- pytest-verbose-parametrize-1.8.0.orig/setup.py ++++ pytest-verbose-parametrize-1.8.0/setup.py +@@ -18,7 +18,6 @@ classifiers = [ + ] + + install_requires = ['pytest', +- 'six', + ] + + tests_require = ['mock; python_version<"3.3"', diff --git a/python-pytest-verbose-parametrize.changes b/python-pytest-verbose-parametrize.changes index e7852fe..a57f303 100644 --- a/python-pytest-verbose-parametrize.changes +++ b/python-pytest-verbose-parametrize.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Oct 22 06:08:51 UTC 2024 - Steve Kowalik + +- Update to 1.8.0: + * Drop support for Python 2 and <3.6, removing compatibility code. + * Use stdlib unittest.mock instead of mock package. + * Removed usage of path.py and path in favour of pathlib. +- Removed patches, included upstream: + * Iterable-collections.patch + * pytest-fixtures-pr171-remove-mock.patch +- Refreshed python-pytest-verbose-parametrize-no-six.patch + ------------------------------------------------------------------- Thu Dec 8 13:18:34 UTC 2022 - pgajdos@suse.com diff --git a/python-pytest-verbose-parametrize.spec b/python-pytest-verbose-parametrize.spec index a410e3b..3a014df 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) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,25 +16,19 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_without python2 Name: python-pytest-verbose-parametrize -Version: 1.7.0 +Version: 1.8.0 Release: 0 Summary: More descriptive output for parametrized pytest tests License: MIT -URL: https://github.com/manahl/pytest-plugins +URL: https://github.com/man-group/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 -# 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 +Patch0: python-pytest-verbose-parametrize-no-six.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools-git} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pytest @@ -43,37 +37,30 @@ BuildArch: noarch BuildRequires: %{python_module coverage} BuildRequires: %{python_module pytest-virtualenv} BuildRequires: %{python_module pytest} -%if %{with python2} -BuildRequires: python2-mock -%endif # /SECTION %python_subpackages %description -More descriptive output for parametrized py.test tests. +More descriptive output for parametrized pytest tests. %prep %autosetup -p1 -n pytest-verbose-parametrize-%{version} -# 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 - %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%pytest +%pytest --ignore tests/integration/test_verbose_parametrize.py %files %{python_files} %doc CHANGES.md README.md %license LICENSE -%{python_sitelib}/pytest_verbose_parametrize.py* +%{python_sitelib}/pytest_verbose_parametrize.py %pycache_only %{python_sitelib}/__pycache__/pytest_verbose_parametrize*.pyc -%{python_sitelib}/pytest_verbose_parametrize-%{version}*-info +%{python_sitelib}/pytest_verbose_parametrize-%{version}.dist-info %changelog