Accepting request 1041386 from home:pgajdos:python

- do not require mock
- use -p1 as quilt refresh does not like higher ones
- modified patches
  % pytest-fixtures-pr171-remove-mock.patch (refreshed)
- added patches
  fix https://github.com/man-group/pytest-plugins/issues/209
  + python-pytest-profiling-no-six.patch

OBS-URL: https://build.opensuse.org/request/show/1041386
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-profiling?expand=0&rev=7
This commit is contained in:
2022-12-09 10:51:24 +00:00
committed by Git OBS Bridge
parent cede0c9e17
commit 605ba2a4ce
4 changed files with 54 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
diff --git a/pytest-profiling/tests/unit/test_profile.py b/pytest-profiling/tests/unit/test_profile.py
index 616c4c6..614422e 100644
--- a/pytest-profiling/tests/unit/test_profile.py
+++ b/pytest-profiling/tests/unit/test_profile.py
--- a/tests/unit/test_profile.py
+++ b/tests/unit/test_profile.py
@@ -8,7 +8,12 @@
reload_module(pytest_profiling)

View File

@@ -0,0 +1,38 @@
Index: pytest-profiling-1.7.0/pytest_profiling.py
===================================================================
--- pytest-profiling-1.7.0.orig/pytest_profiling.py
+++ pytest-profiling-1.7.0/pytest_profiling.py
@@ -10,7 +10,6 @@ import pipes
import errno
from hashlib import md5
-import six
import pytest
LARGE_FILENAME_HASH_LEN = 8
@@ -18,7 +17,7 @@ LARGE_FILENAME_HASH_LEN = 8
def clean_filename(s):
forbidden_chars = set('/?<>\:*|"')
- return six.text_type("".join(c if c not in forbidden_chars and ord(c) < 127 else '_'
+ return str("".join(c if c not in forbidden_chars and ord(c) < 127 else '_'
for c in s))
Index: pytest-profiling-1.7.0/tests/unit/test_profile.py
===================================================================
--- pytest-profiling-1.7.0.orig/tests/unit/test_profile.py
+++ pytest-profiling-1.7.0/tests/unit/test_profile.py
@@ -2,10 +2,10 @@
# the top-level code in pytest_profiling will be omitted from
# coverage, so force it to be reloaded within this test unit under coverage
-from six.moves import reload_module # @UnresolvedImport
+from importlib import reload # @UnresolvedImport
import pytest_profiling
-reload_module(pytest_profiling)
+reload(pytest_profiling)
from pytest_profiling import Profiling, pytest_addoption, pytest_configure

View File

@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Dec 8 11:56:08 UTC 2022 - pgajdos@suse.com
- do not require mock
- use -p1 as quilt refresh does not like higher ones
- modified patches
% pytest-fixtures-pr171-remove-mock.patch (refreshed)
- added patches
fix https://github.com/man-group/pytest-plugins/issues/209
+ python-pytest-profiling-no-six.patch
-------------------------------------------------------------------
Thu Apr 21 21:34:18 UTC 2022 - Ben Greiner <code@bnavigator.de>

View File

@@ -28,20 +28,20 @@ URL: https://github.com/manahl/pytest-plugins
Source: https://files.pythonhosted.org/packages/source/p/pytest-profiling/pytest-profiling-%{version}.tar.gz
# PATCH-FEATURE-UPSTREAM pytest-fixtures-pr171-remove-mock.patch -- gh#man-group#pytest-plugins#171
Patch0: pytest-fixtures-pr171-remove-mock.patch
# https://github.com/man-group/pytest-plugins/issues/209
Patch1: python-pytest-profiling-no-six.patch
BuildRequires: %{python_module setuptools-git}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-gprof2dot
Requires: python-pytest
Requires: python-six
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module gprof2dot}
BuildRequires: %{python_module more-itertools}
BuildRequires: %{python_module pytest-virtualenv}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module six}
%if %{with python2}
BuildRequires: python2-mock
%endif
@@ -52,7 +52,7 @@ BuildRequires: python2-mock
Profiling plugin for py.test
%prep
%autosetup -p2 -n pytest-profiling-%{version}
%autosetup -p1 -n pytest-profiling-%{version}
# Unpin
sed -i 's/more-itertools==5.0.0/more-itertools/' tests/integration/test_profile_integration.py