- Add patch remove-mock.patch:

* Use stdlib mock, not external mock. 
- Drop mock BuildRequires.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-releases?expand=0&rev=17
This commit is contained in:
Steve Kowalik 2022-04-12 02:33:18 +00:00 committed by Git OBS Bridge
parent ffa01a4cdf
commit fe5d40c251
3 changed files with 23 additions and 4 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Apr 12 02:32:28 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch remove-mock.patch:
* Use stdlib mock, not external mock.
- Drop mock BuildRequires.
-------------------------------------------------------------------
Tue Dec 14 00:08:20 UTC 2021 - Ben Greiner <code@bnavigator.de>

View File

@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2021 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
@ -34,6 +34,7 @@ URL: https://github.com/bitprophet/releases
Source: https://files.pythonhosted.org/packages/source/r/releases/releases-%{version}.tar.gz
Patch0: semanticversioning.patch
Patch1: migrate-to-pytest.patch
Patch2: remove-mock.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@ -45,7 +46,6 @@ BuildArch: noarch
BuildRequires: %{python_module Sphinx >= 1.3}
BuildRequires: %{python_module invocations}
BuildRequires: %{python_module invoke}
BuildRequires: %{python_module mock >= 1.0.1}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module semantic_version}
BuildRequires: %{python_module six >= 1.4.1}
@ -70,8 +70,7 @@ Specifically:
overridden on a per-issue basis.
%prep
%setup -q -n releases-%{version}
%autopatch -p1
%autosetup -p1 -n releases-%{version}
%build
%python_build

13
remove-mock.patch Normal file
View File

@ -0,0 +1,13 @@
Index: releases-1.6.3/tests/_util.py
===================================================================
--- releases-1.6.3.orig/tests/_util.py
+++ releases-1.6.3/tests/_util.py
@@ -1,7 +1,7 @@
from docutils.nodes import (
list_item, paragraph,
)
-from mock import Mock
+from unittest.mock import Mock
import six
from releases import (