Accepting request 978728 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/978728 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-elasticsearch?expand=0&rev=11
This commit is contained in:
commit
21057163dd
43
python-elasticsearch-no-mock.patch
Normal file
43
python-elasticsearch-no-mock.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
diff -upr elasticsearch-py-7.6.0.orig/test_elasticsearch/test_connection.py elasticsearch-py-7.6.0/test_elasticsearch/test_connection.py
|
||||||
|
--- elasticsearch-py-7.6.0.orig/test_elasticsearch/test_connection.py 2022-05-23 13:53:49.850202688 +0200
|
||||||
|
+++ elasticsearch-py-7.6.0/test_elasticsearch/test_connection.py 2022-05-23 13:53:49.862202756 +0200
|
||||||
|
@@ -2,7 +2,7 @@ import re
|
||||||
|
import ssl
|
||||||
|
import gzip
|
||||||
|
import io
|
||||||
|
-from mock import Mock, patch
|
||||||
|
+from unittest.mock import Mock, patch
|
||||||
|
import urllib3
|
||||||
|
import warnings
|
||||||
|
from requests.auth import AuthBase
|
||||||
|
diff -upr elasticsearch-py-7.6.0.orig/test_elasticsearch/test_helpers.py elasticsearch-py-7.6.0/test_elasticsearch/test_helpers.py
|
||||||
|
--- elasticsearch-py-7.6.0.orig/test_elasticsearch/test_helpers.py 2022-05-23 13:53:49.846202666 +0200
|
||||||
|
+++ elasticsearch-py-7.6.0/test_elasticsearch/test_helpers.py 2022-05-23 13:53:49.862202756 +0200
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
-import mock
|
||||||
|
+from unittest import mock
|
||||||
|
import time
|
||||||
|
import threading
|
||||||
|
from unittest import SkipTest
|
||||||
|
diff -upr elasticsearch-py-7.6.0.orig/test_elasticsearch/test_server/test_helpers.py elasticsearch-py-7.6.0/test_elasticsearch/test_server/test_helpers.py
|
||||||
|
--- elasticsearch-py-7.6.0.orig/test_elasticsearch/test_server/test_helpers.py 2022-05-23 13:53:49.846202666 +0200
|
||||||
|
+++ elasticsearch-py-7.6.0/test_elasticsearch/test_server/test_helpers.py 2022-05-23 13:53:49.862202756 +0200
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
from elasticsearch import helpers, TransportError
|
||||||
|
from elasticsearch.helpers import ScanError
|
||||||
|
diff -upr elasticsearch-py-7.6.0.orig/test_elasticsearch/test_transport.py elasticsearch-py-7.6.0/test_elasticsearch/test_transport.py
|
||||||
|
--- elasticsearch-py-7.6.0.orig/test_elasticsearch/test_transport.py 2022-05-23 13:53:49.850202688 +0200
|
||||||
|
+++ elasticsearch-py-7.6.0/test_elasticsearch/test_transport.py 2022-05-23 13:53:49.862202756 +0200
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import time
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
from elasticsearch.transport import Transport, get_host_info
|
||||||
|
from elasticsearch.connection import Connection
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 23 12:08:05 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- do not require python-mock for build
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/elastic/elasticsearch-py/issues/1983
|
||||||
|
+ python-elasticsearch-no-mock.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Aug 16 12:33:29 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
Sun Aug 16 12:33:29 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-elasticsearch
|
# spec file for package python-elasticsearch
|
||||||
#
|
#
|
||||||
# Copyright (c) 2020 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -25,9 +25,10 @@ License: Apache-2.0
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/elastic/elasticsearch-py
|
URL: https://github.com/elastic/elasticsearch-py
|
||||||
Source: https://github.com/elastic/elasticsearch-py/archive/%{version}.tar.gz
|
Source: https://github.com/elastic/elasticsearch-py/archive/%{version}.tar.gz
|
||||||
|
# https://github.com/elastic/elasticsearch-py/issues/1983
|
||||||
|
Patch0: python-elasticsearch-no-mock.patch
|
||||||
BuildRequires: %{python_module certifi}
|
BuildRequires: %{python_module certifi}
|
||||||
BuildRequires: %{python_module coverage}
|
BuildRequires: %{python_module coverage}
|
||||||
BuildRequires: %{python_module mock}
|
|
||||||
BuildRequires: %{python_module pyaml}
|
BuildRequires: %{python_module pyaml}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module requests >= 2.0.0}
|
BuildRequires: %{python_module requests >= 2.0.0}
|
||||||
@ -49,6 +50,7 @@ to be opinion-free and very extendable.
|
|||||||
%setup -q -n elasticsearch-py-%{version}
|
%setup -q -n elasticsearch-py-%{version}
|
||||||
rm README.rst
|
rm README.rst
|
||||||
sed -i 's/from nose.plugins.skip import SkipTest/from unittest import SkipTest/' test_elasticsearch/test_helpers.py
|
sed -i 's/from nose.plugins.skip import SkipTest/from unittest import SkipTest/' test_elasticsearch/test_helpers.py
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user