#6 Replace mock dependency with unittest.mock from the standard library
Merged a year ago by jcapitao. Opened a year ago by churchyard.
rpms/ churchyard/python-pymemcache nomock  into  rawhide

@@ -0,0 +1,57 @@ 

+ diff --git a/pymemcache/test/test_client.py b/pymemcache/test/test_client.py

+ index 6094acb..6920a90 100644

+ --- a/pymemcache/test/test_client.py

+ +++ b/pymemcache/test/test_client.py

+ @@ -20,12 +20,12 @@ import errno

+  import functools

+  import json

+  import os

+ -import mock

+  import platform

+  import re

+  import socket

+  import sys

+  import unittest

+ +from unittest import mock

+  

+  import pytest

+  

+ diff --git a/pymemcache/test/test_client_hash.py b/pymemcache/test/test_client_hash.py

+ index ad3f2da..9bac119 100644

+ --- a/pymemcache/test/test_client_hash.py

+ +++ b/pymemcache/test/test_client_hash.py

+ @@ -5,9 +5,9 @@ from pymemcache import pool

+  

+  from .test_client import ClientTestMixin, MockSocket

+  import unittest

+ +from unittest import mock

+  import os

+  import pytest

+ -import mock

+  import socket

+  

+  

+ diff --git a/pymemcache/test/test_client_retry.py b/pymemcache/test/test_client_retry.py

+ index 230a941..de64a46 100644

+ --- a/pymemcache/test/test_client_retry.py

+ +++ b/pymemcache/test/test_client_retry.py

+ @@ -2,8 +2,8 @@

+  

+  import functools

+  import unittest

+ +from unittest import mock

+  

+ -import mock

+  import pytest

+  

+  from .test_client import ClientTestMixin, MockSocket

+ diff --git a/test-requirements.txt b/test-requirements.txt

+ index fccd6ea..cf73af2 100644

+ --- a/test-requirements.txt

+ +++ b/test-requirements.txt

+ @@ -1,5 +1,4 @@

+  future

+ -mock

+  pytest

+  pytest-cov

+  gevent==20.9.0; "PyPy" not in platform_python_implementation

file modified
+7 -2
@@ -3,13 +3,16 @@ 

  

  Name:           python-%{pypi_name}

  Version:        3.5.0

- Release:        2%{?dist}

+ Release:        3%{?dist}

  Summary:        A comprehensive, fast, pure Python memcached client

  

  License:        ASL 2.0

  URL:            https://github.com/Pinterest/pymemcache

  Source0:        https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

  Patch0001:      0001-Skip-unit-tests-resolving-domain-names.patch

+ # Replace mock dependency with unittest.mock from the standard library

+ # Rebased from https://github.com/pinterest/pymemcache/pull/321

+ Patch0002:      0002-Replace-mock-dependency-with-unittest.mock.patch

  BuildArch:      noarch

  

  %global _description\
@@ -28,7 +31,6 @@ 

  %package -n python3-%{pypi_name}

  Summary:        A comprehensive, fast, pure Python memcached client

  BuildRequires:  python3-devel

- BuildRequires:  python3-mock

  BuildRequires:  python3-pytest

  BuildRequires:  python3-pytest-cov

  BuildRequires:  python3-setuptools
@@ -66,6 +68,9 @@ 

  %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info

  

  %changelog

+ * Mon May 23 2022 Miro Hrončok <mhroncok@redhat.com> - 3.5.0-3

+ - Replace mock dependency with unittest.mock from the standard library

+ 

  * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

  

no initial comment

Pull-Request has been merged by jcapitao

a year ago