forked from pool/python-geventhttpclient
Accepting request 855668 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/855668 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-geventhttpclient?expand=0&rev=4
This commit is contained in:
@@ -1,3 +1,19 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 14 00:36:02 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Fix condition around BuildRequirement
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Dec 13 20:26:16 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- We don't need to break Python 2.7
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 11 23:08:43 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Add remove_mock.patch to remove dependency on the external mock
|
||||||
|
package (gh#gwik/geventhttpclient#135).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Aug 1 05:08:20 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
Sat Aug 1 05:08:20 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
@@ -25,14 +25,19 @@ License: MIT
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/gwik/geventhttpclient
|
URL: https://github.com/gwik/geventhttpclient
|
||||||
Source: https://files.pythonhosted.org/packages/source/g/geventhttpclient/geventhttpclient-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/g/geventhttpclient/geventhttpclient-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM remove_mock.patch gh#gwik/geventhttpclient#135 mcepl@suse.com
|
||||||
|
# remove dependency on the external module mock
|
||||||
|
Patch0: remove_mock.patch
|
||||||
BuildRequires: %{python_module certifi}
|
BuildRequires: %{python_module certifi}
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module dpkt}
|
BuildRequires: %{python_module dpkt}
|
||||||
BuildRequires: %{python_module gevent}
|
BuildRequires: %{python_module gevent}
|
||||||
BuildRequires: %{python_module mock}
|
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six}
|
BuildRequires: %{python_module six}
|
||||||
|
%if 0%{?suse_version} <= 1500
|
||||||
|
BuildRequires: python-mock
|
||||||
|
%endif
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-certifi
|
Requires: python-certifi
|
||||||
@@ -52,7 +57,7 @@ generally, it is designed for pulling from REST APIs and streaming
|
|||||||
APIs like Twitter's.
|
APIs like Twitter's.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n geventhttpclient-%{version}
|
%autosetup -p1 -n geventhttpclient-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
21
remove_mock.patch
Normal file
21
remove_mock.patch
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
--- a/src/geventhttpclient/tests/test_ssl.py
|
||||||
|
+++ b/src/geventhttpclient/tests/test_ssl.py
|
||||||
|
@@ -1,5 +1,7 @@
|
||||||
|
-import mock
|
||||||
|
-from mock import patch, Mock
|
||||||
|
+try:
|
||||||
|
+ import unittest.mock as mock
|
||||||
|
+except ImportError:
|
||||||
|
+ import mock
|
||||||
|
|
||||||
|
import dpkt.ssl
|
||||||
|
import six
|
||||||
|
@@ -117,7 +119,7 @@ def _get_sni_sent_from_client(**addition
|
||||||
|
('127.0.0.1', server_port)
|
||||||
|
)
|
||||||
|
with mock.patch(
|
||||||
|
- 'gevent.socket.getaddrinfo', Mock(return_value=[mock_addrinfo])
|
||||||
|
+ 'gevent.socket.getaddrinfo', mock.Mock(return_value=[mock_addrinfo])
|
||||||
|
):
|
||||||
|
|
||||||
|
server_host = 'some_foo'
|
Reference in New Issue
Block a user