Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pytest-profiling for openSUSE:Factory checked in at 2022-04-22 21:54:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pytest-profiling (Old) and /work/SRC/openSUSE:Factory/.python-pytest-profiling.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-profiling" Fri Apr 22 21:54:40 2022 rev:3 rq:971977 version:1.7.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pytest-profiling/python-pytest-profiling.changes 2019-06-03 18:57:16.544386450 +0200 +++ /work/SRC/openSUSE:Factory/.python-pytest-profiling.new.1538/python-pytest-profiling.changes 2022-04-22 21:55:53.686918157 +0200 @@ -1,0 +2,8 @@ +Thu Apr 21 21:34:18 UTC 2022 - Ben Greiner <c...@bnavigator.de> + +- Fix fallout from SUSE's crusade against mock because mock was + required and is not pulled in anymore by something else + * Add pytest-fixtures-pr171-remove-mock.patch + * gh#man-group/pytest-plugins#171 + +------------------------------------------------------------------- New: ---- pytest-fixtures-pr171-remove-mock.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pytest-profiling.spec ++++++ --- /var/tmp/diff_new_pack.cuCHib/_old 2022-04-22 21:55:54.126918658 +0200 +++ /var/tmp/diff_new_pack.cuCHib/_new 2022-04-22 21:55:54.130918663 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-pytest-profiling # -# 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 @@ -17,6 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-pytest-profiling Version: 1.7.0 Release: 0 @@ -25,6 +26,8 @@ Group: Development/Languages/Python 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 BuildRequires: %{python_module setuptools-git} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -39,6 +42,9 @@ BuildRequires: %{python_module pytest-virtualenv} BuildRequires: %{python_module pytest} BuildRequires: %{python_module six} +%if %{with python2} +BuildRequires: python2-mock +%endif # /SECTION %python_subpackages @@ -46,7 +52,7 @@ Profiling plugin for py.test %prep -%setup -q -n pytest-profiling-%{version} +%autosetup -p2 -n pytest-profiling-%{version} # Unpin sed -i 's/more-itertools==5.0.0/more-itertools/' tests/integration/test_profile_integration.py @@ -64,6 +70,8 @@ %files %{python_files} %doc CHANGES.md README.md %license LICENSE -%{python_sitelib}/* +%{python_sitelib}/pytest_profiling.py* +%pycache_only %{python_sitelib}/__pycache__/pytest_profiling*.pyc +%{python_sitelib}/pytest_profiling-%{version}*-info %changelog ++++++ pytest-fixtures-pr171-remove-mock.patch ++++++ 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 @@ -8,7 +8,12 @@ reload_module(pytest_profiling) from pytest_profiling import Profiling, pytest_addoption, pytest_configure -from mock import Mock, ANY, patch, sentinel + +try: + from unittest.mock import Mock, ANY, patch, sentinel +except ImportError: + # python 2 + from mock import Mock, ANY, patch, sentinel def test_creates_prof_dir():