Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-shutil for
openSUSE:Factory checked in at 2022-03-28 16:58:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-shutil (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-shutil.new.1900 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-shutil"
Mon Mar 28 16:58:04 2022 rev:6 rq:964162 version:1.7.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-shutil/python-pytest-shutil.changes
2020-03-27 00:22:23.320168399 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-shutil.new.1900/python-pytest-shutil.changes
2022-03-28 16:58:05.628768259 +0200
@@ -1,0 +2,6 @@
+Wed Mar 23 06:45:41 UTC 2022 - Steve Kowalik <[email protected]>
+
+- Add patch remove-mock.patch:
+ * Do not use external mock.
+
+-------------------------------------------------------------------
New:
----
remove-mock.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-shutil.spec ++++++
--- /var/tmp/diff_new_pack.T8LBR9/_old 2022-03-28 16:58:06.684769693 +0200
+++ /var/tmp/diff_new_pack.T8LBR9/_new 2022-03-28 16:58:06.688769698 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-shutil
#
-# Copyright (c) 2020 SUSE LLC
+# 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
@@ -23,11 +23,11 @@
Release: 0
Summary: A goodie-bag of unix shell and environment tools for pytest
License: MIT
-Group: Development/Languages/Python
URL: https://github.com/manahl/pytest-plugins
Source:
https://files.pythonhosted.org/packages/source/p/pytest-shutil/pytest-shutil-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM Adapted from
gh#man-group/pytest-plugins#66bf6670f3ce10106d57a77ff634a8e5c9c3a39a
+Patch0: remove-mock.patch
BuildRequires: %{python_module execnet}
-BuildRequires: %{python_module mock}
BuildRequires: %{python_module path.py}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools-git}
@@ -40,7 +40,6 @@
%endif
BuildRequires: python-rpm-macros
Requires: python-execnet
-Requires: python-mock
Requires: python-path.py
Requires: python-pytest
Requires: python-six
@@ -57,9 +56,10 @@
tools for automated tests.
%prep
-%setup -q -n pytest-shutil-%{version}
+%autosetup -p1 -n pytest-shutil-%{version}
sed -i '/contextlib2/d' setup.py
sed -i '/path.\py/d' setup.py
+sed -i '/mock/d' setup.py
%build
%python_build
++++++ remove-mock.patch ++++++
Index: pytest-shutil-1.7.0/pytest_shutil/run.py
===================================================================
--- pytest-shutil-1.7.0.orig/pytest_shutil/run.py
+++ pytest-shutil-1.7.0/pytest_shutil/run.py
@@ -11,7 +11,12 @@ import textwrap
from contextlib import closing
import subprocess
-from mock import patch
+try:
+ from unittest.mock import patch
+except ImportError:
+ # python 2
+ from mock import patch
+
import execnet
from six.moves import cPickle # @UnresolvedImport
Index: pytest-shutil-1.7.0/tests/integration/test_run_integration.py
===================================================================
--- pytest-shutil-1.7.0.orig/tests/integration/test_run_integration.py
+++ pytest-shutil-1.7.0/tests/integration/test_run_integration.py
@@ -8,7 +8,10 @@ import inspect
import textwrap
from uuid import uuid4
-import mock
+try:
+ from unittest import mock
+except ImportError:
+ import mock
from pytest_shutil import run, workspace
from pytest_shutil.env import no_cov
Index: pytest-shutil-1.7.0/tests/unit/test_run.py
===================================================================
--- pytest-shutil-1.7.0.orig/tests/unit/test_run.py
+++ pytest-shutil-1.7.0/tests/unit/test_run.py
@@ -3,7 +3,13 @@ from uuid import uuid4
from subprocess import PIPE, STDOUT
import pytest
-from mock import Mock, patch, sentinel, DEFAULT, call
+
+try:
+ from unittest.mock import Mock, patch, sentinel, DEFAULT, call
+except ImportError:
+ # python 2
+ from mock import Mock, patch, sentinel, DEFAULT, call
+
from six.moves import cPickle
from pytest_shutil import run