From d2bdec8013590617689b5df51f9760a5741377641e520fb6adc7f52ba96551db Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 1 Sep 2023 17:03:10 +0000 Subject: [PATCH] Accepting request 1108497 from home:mcepl:branches:devel:languages:python - Update to 8.9.0: Number of changes is so large, that I suggest looking at it at https://www.elastic.co/guide/en/elasticsearch/client/python-api/master/release-notes.html. - Remove upstreamed python-elasticsearch-no-nose.patch. OBS-URL: https://build.opensuse.org/request/show/1108497 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-elasticsearch?expand=0&rev=37 --- 7.6.0.tar.gz | 3 -- python-elasticsearch-no-mock.patch | 46 ------------------ python-elasticsearch-no-nose.patch | 77 ------------------------------ python-elasticsearch.changes | 8 ++++ python-elasticsearch.spec | 17 +++---- v8.9.0.tar.gz | 3 ++ 6 files changed, 18 insertions(+), 136 deletions(-) delete mode 100644 7.6.0.tar.gz delete mode 100644 python-elasticsearch-no-mock.patch delete mode 100644 python-elasticsearch-no-nose.patch create mode 100644 v8.9.0.tar.gz diff --git a/7.6.0.tar.gz b/7.6.0.tar.gz deleted file mode 100644 index 064221c..0000000 --- a/7.6.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20b6b2ec5f429ef7d102fb8af61fe4a244e1f44a450ec3bceaf1c8058eeefde3 -size 120271 diff --git a/python-elasticsearch-no-mock.patch b/python-elasticsearch-no-mock.patch deleted file mode 100644 index 0b6875b..0000000 --- a/python-elasticsearch-no-mock.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- - 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 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 helpers, TransportError - from elasticsearch.helpers import ScanError ---- 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 - - 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 deleted file mode 100644 index a2f86b9..0000000 --- a/python-elasticsearch-no-nose.patch +++ /dev/null @@ -1,77 +0,0 @@ ---- - 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 f6b2c8d..886d491 100644 --- a/python-elasticsearch.changes +++ b/python-elasticsearch.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Sep 1 16:36:50 UTC 2023 - Matej Cepl + +- Update to 8.9.0: + Number of changes is so large, that I suggest looking at it at + https://www.elastic.co/guide/en/elasticsearch/client/python-api/master/release-notes.html. +- Remove upstreamed python-elasticsearch-no-nose.patch. + ------------------------------------------------------------------- Fri Apr 21 12:24:36 UTC 2023 - Dirk Müller diff --git a/python-elasticsearch.spec b/python-elasticsearch.spec index 055bceb..8934e84 100644 --- a/python-elasticsearch.spec +++ b/python-elasticsearch.spec @@ -22,20 +22,18 @@ Name: python-elasticsearch # 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 +Version: 8.9.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/%{version}.tar.gz -Patch0: python-elasticsearch-no-nose.patch -# https://github.com/elastic/elasticsearch-py/issues/1983 -Patch1: python-elasticsearch-no-mock.patch +Source: https://github.com/elastic/elasticsearch-py/archive/refs/tags/v%{version}.tar.gz BuildRequires: %{python_module certifi} BuildRequires: %{python_module elastic-transport} -BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module pip} BuildRequires: %{python_module urllib3 >= 1.21.1} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-elastic-transport @@ -58,13 +56,12 @@ 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 +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -72,7 +69,7 @@ rm README.rst %files %{python_files} %license LICENSE -%doc AUTHORS Changelog.rst README +%doc CODE_OF_CONDUCT.md CHANGELOG.md README.rst %{python_sitelib}/elasticsearch %{python_sitelib}/elasticsearch-%{version}*-info diff --git a/v8.9.0.tar.gz b/v8.9.0.tar.gz new file mode 100644 index 0000000..11fe12d --- /dev/null +++ b/v8.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c67d48cfa08a96e2ab48d3cfcf8d7a90b73b6fa5f6af5478e50d1c67fb7e4c1f +size 881506