From a0287c63726f0b84cc0fe148cba4fbc449e1c659082b02422c0072a0adf54219 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 17 Oct 2022 21:17:30 +0000 Subject: [PATCH 1/5] - Update to 8.4.3: - Client is compatible with Elasticsearch 8.4.3 - Added the error_trace, filter_path, human and pretty parameters to the get_source API. - Added the ext parameter to the search API. - Added the ext parameter to the async_search.submit API. - Added the ext parameter to the fleet.search API. - Added the knn parameter to the search API. - Added the knn parameter to the async_search.submit API. - Added the cache_size parameter to the ml.start_trained_model_deployment API. - Added the security.update_api_key API. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-elasticsearch?expand=0&rev=29 --- elasticsearch-py-8.3.3.tar.gz | 3 --- elasticsearch-py-8.4.3.tar.gz | 3 +++ python-elasticsearch-no-mock.patch | 39 ------------------------------ python-elasticsearch.changes | 16 ++++++++++++ python-elasticsearch.spec | 4 +-- 5 files changed, 20 insertions(+), 45 deletions(-) delete mode 100644 elasticsearch-py-8.3.3.tar.gz create mode 100644 elasticsearch-py-8.4.3.tar.gz delete mode 100644 python-elasticsearch-no-mock.patch diff --git a/elasticsearch-py-8.3.3.tar.gz b/elasticsearch-py-8.3.3.tar.gz deleted file mode 100644 index 0352b78..0000000 --- a/elasticsearch-py-8.3.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4b04930ff043894738e835ef6f6cc172f2e4929d3338263f6e650ef0fed76a93 -size 514532 diff --git a/elasticsearch-py-8.4.3.tar.gz b/elasticsearch-py-8.4.3.tar.gz new file mode 100644 index 0000000..07578cd --- /dev/null +++ b/elasticsearch-py-8.4.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2528308183c9f88b460f742084e20f793b8cc7a0271d36250efcaaedbf8c224 +size 516311 diff --git a/python-elasticsearch-no-mock.patch b/python-elasticsearch-no-mock.patch deleted file mode 100644 index 169282e..0000000 --- a/python-elasticsearch-no-mock.patch +++ /dev/null @@ -1,39 +0,0 @@ -Index: elasticsearch-py-8.3.3/test_elasticsearch/test_helpers.py -=================================================================== ---- elasticsearch-py-8.3.3.orig/test_elasticsearch/test_helpers.py -+++ elasticsearch-py-8.3.3/test_elasticsearch/test_helpers.py -@@ -19,7 +19,7 @@ - import threading - import time - --import mock -+from unittest import mock - import pytest - - from elasticsearch import Elasticsearch, helpers -Index: elasticsearch-py-8.3.3/test_elasticsearch/test_server/test_helpers.py -=================================================================== ---- elasticsearch-py-8.3.3.orig/test_elasticsearch/test_server/test_helpers.py -+++ elasticsearch-py-8.3.3/test_elasticsearch/test_server/test_helpers.py -@@ -21,7 +21,7 @@ from datetime import datetime, timedelta - import pytest - from dateutil import tz - from elastic_transport import ApiResponseMeta, ObjectApiResponse --from mock import call, patch -+from unittest.mock import call, patch - - from elasticsearch import ApiError, helpers - from elasticsearch.helpers import ScanError -Index: elasticsearch-py-8.3.3/test_elasticsearch/test_async/test_server/test_helpers.py -=================================================================== ---- elasticsearch-py-8.3.3.orig/test_elasticsearch/test_async/test_server/test_helpers.py -+++ elasticsearch-py-8.3.3/test_elasticsearch/test_async/test_server/test_helpers.py -@@ -20,7 +20,7 @@ from datetime import datetime, timedelta - - import pytest - from elastic_transport import ApiResponseMeta, ObjectApiResponse --from mock import MagicMock, call, patch -+from unittest.mock import MagicMock, call, patch - - from elasticsearch import helpers - from elasticsearch.exceptions import ApiError diff --git a/python-elasticsearch.changes b/python-elasticsearch.changes index 37050ea..d3f07b3 100644 --- a/python-elasticsearch.changes +++ b/python-elasticsearch.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Mon Oct 17 21:13:04 UTC 2022 - Matej Cepl + +- Update to 8.4.3: + - Client is compatible with Elasticsearch 8.4.3 + - Added the error_trace, filter_path, human and pretty + parameters to the get_source API. + - Added the ext parameter to the search API. + - Added the ext parameter to the async_search.submit API. + - Added the ext parameter to the fleet.search API. + - Added the knn parameter to the search API. + - Added the knn parameter to the async_search.submit API. + - Added the cache_size parameter to the + ml.start_trained_model_deployment API. + - Added the security.update_api_key API. + ------------------------------------------------------------------- Thu Aug 18 16:35:28 UTC 2022 - Ben Greiner diff --git a/python-elasticsearch.spec b/python-elasticsearch.spec index dad6566..5af9810 100644 --- a/python-elasticsearch.spec +++ b/python-elasticsearch.spec @@ -19,15 +19,13 @@ %{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 Name: python-elasticsearch -Version: 8.3.3 +Version: 8.4.3 Release: 0 Summary: Python client for Elasticsearch License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/elastic/elasticsearch-py Source: https://github.com/elastic/elasticsearch-py/archive/refs/tags/v%{version}.tar.gz#/elasticsearch-py-%{version}.tar.gz -# https://github.com/elastic/elasticsearch-py/issues/1983 -Patch0: python-elasticsearch-no-mock.patch BuildRequires: %{python_module elastic-transport >= 8 with %python-elastic-transport < 9} BuildRequires: %{python_module setuptools} BuildRequires: fdupes From eccfced67dfadc69795c95927834384f90a4669f0ea0b22fc30ca165f44dbc33 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 17 Oct 2022 21:17:57 +0000 Subject: [PATCH 2/5] - Remove upstreamed python-elasticsearch-no-mock.patch. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-elasticsearch?expand=0&rev=30 --- python-elasticsearch.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/python-elasticsearch.changes b/python-elasticsearch.changes index d3f07b3..fd95e79 100644 --- a/python-elasticsearch.changes +++ b/python-elasticsearch.changes @@ -13,6 +13,7 @@ Mon Oct 17 21:13:04 UTC 2022 - Matej Cepl - Added the cache_size parameter to the ml.start_trained_model_deployment API. - Added the security.update_api_key API. +- Remove upstreamed python-elasticsearch-no-mock.patch. ------------------------------------------------------------------- Thu Aug 18 16:35:28 UTC 2022 - Ben Greiner From ab26cb3ea06bd24840047f2b615324caa00db004a36aa9b50c9d8001f24877ec Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 17 Oct 2022 21:19:14 +0000 Subject: [PATCH 3/5] Remove conditional OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-elasticsearch?expand=0&rev=31 --- python-elasticsearch.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-elasticsearch.spec b/python-elasticsearch.spec index 5af9810..3ede470 100644 --- a/python-elasticsearch.spec +++ b/python-elasticsearch.spec @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 Name: python-elasticsearch Version: 8.4.3 From 3bc84cdba592d3519383bf3bdab8cdb57d82ec4ce8fd6cceedb13d2eebddaeec Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 18 Oct 2022 08:56:43 +0000 Subject: [PATCH 4/5] Accepting request 1029684 from devel:languages:python ok OBS-URL: https://build.opensuse.org/request/show/1029684 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-elasticsearch?expand=0&rev=32 --- elasticsearch-py-8.3.3.tar.gz | 3 +++ elasticsearch-py-8.4.3.tar.gz | 3 --- python-elasticsearch-no-mock.patch | 39 ++++++++++++++++++++++++++++++ python-elasticsearch.changes | 17 ------------- python-elasticsearch.spec | 5 +++- 5 files changed, 46 insertions(+), 21 deletions(-) create mode 100644 elasticsearch-py-8.3.3.tar.gz delete mode 100644 elasticsearch-py-8.4.3.tar.gz create mode 100644 python-elasticsearch-no-mock.patch diff --git a/elasticsearch-py-8.3.3.tar.gz b/elasticsearch-py-8.3.3.tar.gz new file mode 100644 index 0000000..0352b78 --- /dev/null +++ b/elasticsearch-py-8.3.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b04930ff043894738e835ef6f6cc172f2e4929d3338263f6e650ef0fed76a93 +size 514532 diff --git a/elasticsearch-py-8.4.3.tar.gz b/elasticsearch-py-8.4.3.tar.gz deleted file mode 100644 index 07578cd..0000000 --- a/elasticsearch-py-8.4.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a2528308183c9f88b460f742084e20f793b8cc7a0271d36250efcaaedbf8c224 -size 516311 diff --git a/python-elasticsearch-no-mock.patch b/python-elasticsearch-no-mock.patch new file mode 100644 index 0000000..169282e --- /dev/null +++ b/python-elasticsearch-no-mock.patch @@ -0,0 +1,39 @@ +Index: elasticsearch-py-8.3.3/test_elasticsearch/test_helpers.py +=================================================================== +--- elasticsearch-py-8.3.3.orig/test_elasticsearch/test_helpers.py ++++ elasticsearch-py-8.3.3/test_elasticsearch/test_helpers.py +@@ -19,7 +19,7 @@ + import threading + import time + +-import mock ++from unittest import mock + import pytest + + from elasticsearch import Elasticsearch, helpers +Index: elasticsearch-py-8.3.3/test_elasticsearch/test_server/test_helpers.py +=================================================================== +--- elasticsearch-py-8.3.3.orig/test_elasticsearch/test_server/test_helpers.py ++++ elasticsearch-py-8.3.3/test_elasticsearch/test_server/test_helpers.py +@@ -21,7 +21,7 @@ from datetime import datetime, timedelta + import pytest + from dateutil import tz + from elastic_transport import ApiResponseMeta, ObjectApiResponse +-from mock import call, patch ++from unittest.mock import call, patch + + from elasticsearch import ApiError, helpers + from elasticsearch.helpers import ScanError +Index: elasticsearch-py-8.3.3/test_elasticsearch/test_async/test_server/test_helpers.py +=================================================================== +--- elasticsearch-py-8.3.3.orig/test_elasticsearch/test_async/test_server/test_helpers.py ++++ elasticsearch-py-8.3.3/test_elasticsearch/test_async/test_server/test_helpers.py +@@ -20,7 +20,7 @@ from datetime import datetime, timedelta + + import pytest + from elastic_transport import ApiResponseMeta, ObjectApiResponse +-from mock import MagicMock, call, patch ++from unittest.mock import MagicMock, call, patch + + from elasticsearch import helpers + from elasticsearch.exceptions import ApiError diff --git a/python-elasticsearch.changes b/python-elasticsearch.changes index fd95e79..37050ea 100644 --- a/python-elasticsearch.changes +++ b/python-elasticsearch.changes @@ -1,20 +1,3 @@ -------------------------------------------------------------------- -Mon Oct 17 21:13:04 UTC 2022 - Matej Cepl - -- Update to 8.4.3: - - Client is compatible with Elasticsearch 8.4.3 - - Added the error_trace, filter_path, human and pretty - parameters to the get_source API. - - Added the ext parameter to the search API. - - Added the ext parameter to the async_search.submit API. - - Added the ext parameter to the fleet.search API. - - Added the knn parameter to the search API. - - Added the knn parameter to the async_search.submit API. - - Added the cache_size parameter to the - ml.start_trained_model_deployment API. - - Added the security.update_api_key API. -- Remove upstreamed python-elasticsearch-no-mock.patch. - ------------------------------------------------------------------- Thu Aug 18 16:35:28 UTC 2022 - Ben Greiner diff --git a/python-elasticsearch.spec b/python-elasticsearch.spec index 3ede470..dad6566 100644 --- a/python-elasticsearch.spec +++ b/python-elasticsearch.spec @@ -16,15 +16,18 @@ # +%{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 Name: python-elasticsearch -Version: 8.4.3 +Version: 8.3.3 Release: 0 Summary: Python client for Elasticsearch License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/elastic/elasticsearch-py Source: https://github.com/elastic/elasticsearch-py/archive/refs/tags/v%{version}.tar.gz#/elasticsearch-py-%{version}.tar.gz +# https://github.com/elastic/elasticsearch-py/issues/1983 +Patch0: python-elasticsearch-no-mock.patch BuildRequires: %{python_module elastic-transport >= 8 with %python-elastic-transport < 9} BuildRequires: %{python_module setuptools} BuildRequires: fdupes From 0d5b4ecd292d14c6097e7f079df2b7b35fe73c04a130a824094e3e5eb0e02830 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 18 Oct 2022 10:09:23 +0000 Subject: [PATCH 5/5] - Revert back to 7.6.0. elasticsearch-dsl is not compatible with 8.* releases (gh#elastic/elasticsearch-dsl-py#1569). - Add python-elasticsearch-no-nose.patch to replace sed call in SPEC file. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-elasticsearch?expand=0&rev=33 --- 7.6.0.tar.gz | 3 ++ elasticsearch-py-8.3.3.tar.gz | 3 -- python-elasticsearch-no-mock.patch | 75 ++++++++++++++++------------- python-elasticsearch-no-nose.patch | 77 ++++++++++++++++++++++++++++++ python-elasticsearch.changes | 8 ++++ python-elasticsearch.spec | 20 +++++--- 6 files changed, 142 insertions(+), 44 deletions(-) create mode 100644 7.6.0.tar.gz delete mode 100644 elasticsearch-py-8.3.3.tar.gz create mode 100644 python-elasticsearch-no-nose.patch diff --git a/7.6.0.tar.gz b/7.6.0.tar.gz new file mode 100644 index 0000000..064221c --- /dev/null +++ b/7.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20b6b2ec5f429ef7d102fb8af61fe4a244e1f44a450ec3bceaf1c8058eeefde3 +size 120271 diff --git a/elasticsearch-py-8.3.3.tar.gz b/elasticsearch-py-8.3.3.tar.gz deleted file mode 100644 index 0352b78..0000000 --- a/elasticsearch-py-8.3.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4b04930ff043894738e835ef6f6cc172f2e4929d3338263f6e650ef0fed76a93 -size 514532 diff --git a/python-elasticsearch-no-mock.patch b/python-elasticsearch-no-mock.patch index 169282e..0b6875b 100644 --- a/python-elasticsearch-no-mock.patch +++ b/python-elasticsearch-no-mock.patch @@ -1,39 +1,46 @@ -Index: elasticsearch-py-8.3.3/test_elasticsearch/test_helpers.py -=================================================================== ---- elasticsearch-py-8.3.3.orig/test_elasticsearch/test_helpers.py -+++ elasticsearch-py-8.3.3/test_elasticsearch/test_helpers.py -@@ -19,7 +19,7 @@ - import threading - import time - +--- + test_elasticsearch/test_connection.py | 2 +- + test_elasticsearch/test_helpers.py | 2 +- + test_elasticsearch/test_server/test_helpers.py | 2 +- + test_elasticsearch/test_transport.py | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +--- a/test_elasticsearch/test_connection.py ++++ b/test_elasticsearch/test_connection.py +@@ -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 +--- a/test_elasticsearch/test_helpers.py ++++ b/test_elasticsearch/test_helpers.py +@@ -1,5 +1,5 @@ + # -*- coding: utf-8 -*- -import mock +from unittest import mock - import pytest + import time + import threading + from unittest import SkipTest +--- a/test_elasticsearch/test_server/test_helpers.py ++++ b/test_elasticsearch/test_server/test_helpers.py +@@ -1,4 +1,4 @@ +-from mock import patch ++from unittest.mock import patch - from elasticsearch import Elasticsearch, helpers -Index: elasticsearch-py-8.3.3/test_elasticsearch/test_server/test_helpers.py -=================================================================== ---- elasticsearch-py-8.3.3.orig/test_elasticsearch/test_server/test_helpers.py -+++ elasticsearch-py-8.3.3/test_elasticsearch/test_server/test_helpers.py -@@ -21,7 +21,7 @@ from datetime import datetime, timedelta - import pytest - from dateutil import tz - from elastic_transport import ApiResponseMeta, ObjectApiResponse --from mock import call, patch -+from unittest.mock import call, patch - - from elasticsearch import ApiError, helpers + from elasticsearch import helpers, TransportError from elasticsearch.helpers import ScanError -Index: elasticsearch-py-8.3.3/test_elasticsearch/test_async/test_server/test_helpers.py -=================================================================== ---- elasticsearch-py-8.3.3.orig/test_elasticsearch/test_async/test_server/test_helpers.py -+++ elasticsearch-py-8.3.3/test_elasticsearch/test_async/test_server/test_helpers.py -@@ -20,7 +20,7 @@ from datetime import datetime, timedelta +--- a/test_elasticsearch/test_transport.py ++++ b/test_elasticsearch/test_transport.py +@@ -1,7 +1,7 @@ + # -*- coding: utf-8 -*- + from __future__ import unicode_literals + import time +-from mock import patch ++from unittest.mock import patch - import pytest - from elastic_transport import ApiResponseMeta, ObjectApiResponse --from mock import MagicMock, call, patch -+from unittest.mock import MagicMock, call, patch - - from elasticsearch import helpers - from elasticsearch.exceptions import ApiError + from elasticsearch.transport import Transport, get_host_info + from elasticsearch.connection import Connection diff --git a/python-elasticsearch-no-nose.patch b/python-elasticsearch-no-nose.patch new file mode 100644 index 0000000..a2f86b9 --- /dev/null +++ b/python-elasticsearch-no-nose.patch @@ -0,0 +1,77 @@ +--- + dev-requirements.txt | 2 -- + setup.py | 2 -- + test_elasticsearch/run_tests.py | 13 ++----------- + test_elasticsearch/test_helpers.py | 2 +- + 4 files changed, 3 insertions(+), 16 deletions(-) + +--- a/dev-requirements.txt ++++ b/dev-requirements.txt +@@ -1,8 +1,6 @@ + requests>=2, <3 +-nose + coverage + mock +-nosexcover + sphinx<1.7 + sphinx_rtd_theme + jinja2 +--- a/setup.py ++++ b/setup.py +@@ -13,11 +13,9 @@ with open(join(dirname(__file__), "READM + install_requires = ["urllib3>=1.21.1"] + tests_require = [ + "requests>=2.0.0, <3.0.0", +- "nose", + "coverage", + "mock", + "pyyaml", +- "nosexcover", + ] + + docs_require = ["sphinx<1.7", "sphinx_rtd_theme"] +--- a/test_elasticsearch/run_tests.py ++++ b/test_elasticsearch/run_tests.py +@@ -6,7 +6,7 @@ from os import environ + from os.path import dirname, join, pardir, abspath, exists + import subprocess + +-import nose ++import unittest + + + def fetch_es_repo(): +@@ -64,21 +64,12 @@ def run_all(argv=None): + # fetch yaml tests + fetch_es_repo() + +- # always insert coverage when running tests + if argv is None: + argv = [ +- "nosetests", +- "--with-xunit", +- "--with-xcoverage", +- "--cover-package=elasticsearch", +- "--cover-erase", +- "--logging-filter=elasticsearch", +- "--logging-level=DEBUG", + "--verbose", +- "--with-id", + ] + +- nose.run_exit(argv=argv, defaultTest=abspath(dirname(__file__))) ++ unittest.main(argv=argv, defaultTest=abspath(dirname(__file__))) + + + if __name__ == "__main__": +--- a/test_elasticsearch/test_helpers.py ++++ b/test_elasticsearch/test_helpers.py +@@ -2,7 +2,7 @@ + import mock + import time + import threading +-from nose.plugins.skip import SkipTest ++from unittest import SkipTest + from elasticsearch import helpers, Elasticsearch + from elasticsearch.serializer import JSONSerializer + diff --git a/python-elasticsearch.changes b/python-elasticsearch.changes index 37050ea..9c9b820 100644 --- a/python-elasticsearch.changes +++ b/python-elasticsearch.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Oct 18 10:04:37 UTC 2022 - Matej Cepl + +- Revert back to 7.6.0. elasticsearch-dsl is not compatible with + 8.* releases (gh#elastic/elasticsearch-dsl-py#1569). +- Add python-elasticsearch-no-nose.patch to replace sed call in + SPEC file. + ------------------------------------------------------------------- Thu Aug 18 16:35:28 UTC 2022 - Ben Greiner diff --git a/python-elasticsearch.spec b/python-elasticsearch.spec index dad6566..1d0a55d 100644 --- a/python-elasticsearch.spec +++ b/python-elasticsearch.spec @@ -16,23 +16,28 @@ # -%{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 Name: python-elasticsearch -Version: 8.3.3 +# DO NOT UPDATE until the compatible version of +# python-elasticsearch-dsl is available (i.e., the same major +# version ... currently we are waiting on 8.* release). +Version: 7.6.0 Release: 0 Summary: Python client for Elasticsearch License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/elastic/elasticsearch-py -Source: https://github.com/elastic/elasticsearch-py/archive/refs/tags/v%{version}.tar.gz#/elasticsearch-py-%{version}.tar.gz +Source: https://github.com/elastic/elasticsearch-py/archive/%{version}.tar.gz +Patch0: python-elasticsearch-no-nose.patch # https://github.com/elastic/elasticsearch-py/issues/1983 -Patch0: python-elasticsearch-no-mock.patch -BuildRequires: %{python_module elastic-transport >= 8 with %python-elastic-transport < 9} +Patch1: python-elasticsearch-no-mock.patch +BuildRequires: %{python_module certifi} +BuildRequires: %{python_module elastic-transport} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module urllib3 >= 1.21.1} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: (python-elastic-transport >= 8 with python-elastic-transport < 9) +Requires: python-elastic-transport BuildArch: noarch # SECTION test BuildRequires: %{python_module PyYAML >= 5.4} @@ -52,6 +57,7 @@ to be opinion-free and very extendable. %prep %autosetup -p1 -n elasticsearch-py-%{version} sed -i '/addopts/d' setup.cfg +rm README.rst %build %python_build @@ -65,7 +71,7 @@ sed -i '/addopts/d' setup.cfg %files %{python_files} %license LICENSE -%doc README.rst +%doc AUTHORS Changelog.rst README %{python_sitelib}/elasticsearch %{python_sitelib}/elasticsearch-%{version}*-info