Accepting request 998086 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/998086
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-elasticsearch?expand=0&rev=12
This commit is contained in:
Dominique Leuenberger 2022-08-20 18:27:42 +00:00 committed by Git OBS Bridge
commit bb05159f9d
5 changed files with 273 additions and 59 deletions

BIN
7.6.0.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4b04930ff043894738e835ef6f6cc172f2e4929d3338263f6e650ef0fed76a93
size 514532

View File

@ -1,43 +1,39 @@
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 -*-
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 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
import pytest
from elasticsearch import helpers, TransportError
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
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
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
from elasticsearch.transport import Transport, get_host_info
from elasticsearch.connection import Connection
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

View File

@ -1,3 +1,219 @@
-------------------------------------------------------------------
Thu Aug 18 16:35:28 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 8.3.3
* Client is compatible with Elasticsearch 8.3.3
- Release 8.3.2
+ Security
* Added the refresh parameter to the
security.create_service_token API.
- Release 8.3.1
+ Security
* Added the experimental security.has_privileges_user_profile
API
* Added the hint parameter to the experimental
security.suggest_user_profiles API
- Release 8.3.0
* Client is compatible with Elasticsearch 8.3.0
- Release 8.2.3
+ Documents
* Added the routing parameter to the msearch API.
+ CAT
* Added the cat.component_templates API.
+ Ingest
* Added the if_version parameter to the ingest.put_pipeline
API.
+ Security
* Changed the name parameter for the
security.create_service_token API from required to optional.
* Added the refresh parameter to the
security.create_service_token API.
* Changed the name of access parameter to the labels parameter
in the security.update_user_profile_data API.
+ Shutdown
* Added the timeout and master_timeout parameters to the
shutdown.get_node, shutdown.delete_node, and
shutdown.put_node APIs.
* Added the reason, type, allocation_delay, and
target_node_name parameters to the shutdown.put_node API.
- Release 8.2.2
* Client is compatible with Elasticsearch 8.2.2
- Release 8.2.1
+ Machine Learning
* Added the inference_config parameter to the
ml.infer_trained_model_deployment API
- Release 8.2.0
+ Client
* Re-introduced support for passing requests.auth.BaseAuth
objects to the http_auth parameter which was available in
7.x.
+ Search
* Added the filter parameter to the experimental knn_search API
+ Documents
* Changed the source and dest parameters for the reindex API
from optional to required
+ Indices
* Added the indices.field_usage_stats API
* Added the indices.modify_data_stream API
* Added the fields and types parameters to the field_caps API
* Added the ignore_unvailable parameter to the
open_point_in_time API
* Added the master_timeout and timeout parameters to the
indices.delete API
* Added the features parameter to the indices.get API
+ Machine Learning
* Added the ml.get_memory_stats API
+ Migrations
* Added the migrations.get_feature_upgrade_status API
* Added the migrations.post_feature_upgrade API
+ Nodes
* Added the nodes.clear_repositories_metering_archive API
* Added the nodes.get_repositories_metering_info API
+ Security
* Added the beta security.activate_user_profile API
* Added the beta security.disable_user_profile API
* Added the beta security.enable_user_profile API
* Added the beta security.get_user_profile API
* Added the beta security.suggest_user_profiles API
* Added the beta security.update_user_profile_data API
+ SQL
* Added the catalog, index_using_frozen, keep_alive,
keep_on_completion, runtime_mappings, and
wait_for_completion_timeout parameters to the sql.query API
- Release 8.1.2
* Client is compatible with Elasticsearch 8.1.2
- Release 8.1.1
+ Documents
* Changed the source and dest parameters of the reindex API to
be required.
+ Mappings
* Changed the fields parameter of the field_caps API to be
required.
- Release 8.1.0
+ Transforms
* Added the transform.reset_transform API
- Release 8.0.0
+ Added
* Added the top-level .options() method to Elasticsearch and
AsyncElasticsearch for modifying transport options.
* Added parameters corresponding to JSON request body fields
for all APIs
* Added basic_auth parameter for specifying username and
password authentication
* Added bearer_auth parameter for specifying an HTTP bearer
token or service token
* Added the meta property to ApiError to access the HTTP
response metadata of an error.
* Added a check that a compatible version of the
elastic-transport package is installed.
* Changed
* Changed the transport layer to use the elastic-transport
package
* Changed user-defined body parameters to have semantic names
(e.g index(document={...}) instead of index(body={...})).
* Changed responses to be objects with two properties, meta for
response metadata (HTTP status, headers, node, etc) and body
for a typed body.
* Changed AsyncElasticsearch to always be available, regardless
of whether aiohttp is installed
* Changed exception hierarchy, the major change is a new
exception ApiError which differentiates between an error
thats raised from the transport layer (previously
elasticsearch.exceptions.TransportError, now
elastic_transport.TransportError) and one raised from the API
layer
* Changed the name of JSONSerializer to JsonSerializer for
consistency with other serializer names. Added an alias to
the old name for backwards compatibility
* Changed the default mimetypes (application/json) to instead
use compatibility mimetypes
(application/vnd.elasticsearch+json) which always request for
responses compatibility with version 8.x.
+ Removed
* Removed support for Python 2.7 and Python 3.5, the library
now supports only Python 3.6+
* Removed the elasticsearch.connection module as all
functionality has been moved to the elastic-transport package
* Removed the default URL of http://localhost:9200 due to
Elasticsearch 8.0 default configuration being
https://localhost:9200. The clients connection to
Elasticsearch now must be specified with scheme, host, and
port or with the cloud_id parameter
* Removed the ability to use positional arguments with API
methods. Going forward all API parameters must be
keyword-only parameters
* Removed the doc_type, include_type_name, and copy_settings
parameters from many document and index APIs
+ Deprecated
* Deprecated the body and params parameters on all APIs
* Deprecated setting transport options http_auth, api_key,
ignore, request_timeout, headers, and opaque_id All of these
settings should instead be set via the .options() method
* Deprecated the elasticsearch.transport and
elasticsearch.client modules. These modules will be removed
in a future version
+ CAT
* Removed the deprecated local parameter from the cat.indices,
cat.nodes, cat.shards API
* Removed the deprecated allow_no_datafeeds parameter from the
cat.ml_datafeeds API
* Removed the deprecated allow_no_jobs parameter from the
cat.ml_jobs API
* Removed the deprecated size parameter from the
cat.thread_pool API
* Added the time parameter to the cat.thread_pool API
+ Documents
* Removed the deprecated size parameter from the
delete_by_query API
* Removed the deprecated size parameter from the
update_by_query API
+ Indices
* Removed the deprecated indices.flush_synced API
* Removed the deprecated indices.freeze API
* Removed the deprecated indices.get_upgrade API
* Removed the deprecated indices.upgrade API
* Removed the deprecated indices.exist_type API
* Removed the deprecated parameter copy_settings from the
indices.shrink API
* Deprecated the verbose parameter of the indices.segments API
+ License / X-Pack
* Deprecated the accept_enterprise parameter of the license.get
API
* Deprecated the accept_enterprise parameter of the xpack.info
API
+ Machine Learning
* Added the experimental ml.infer_trained_model_deployment API
* Added the experimental ml.put_trained_model_definition_part
API
* Added the experimental ml.put_trained_model_vocabulary API
* Added the experimental ml.start_trained_model_deployment API
* Added the experimental ml.stop_trained_model_deployment API
* Added the timeout parameter to the ml.delete_trained_model
API
* Removed the deprecated allow_no_jobs parameter from the
ml.close_job API
* Removed the deprecated ml.find_text_structure API
* Removed the deprecated allow_no_datafeeds parameter from the
ml.get_datafeed_stats API
* Removed the deprecated allow_no_datafeeds parameter from the
ml.get_datafeeds API
* Removed the deprecated allow_no_jobs parameter from the
ml.get_job_stats API
* Removed the deprecated allow_no_jobs parameter from the
ml.get_jobs API
* Removed the deprecated allow_no_jobs parameter from the
ml.get_overall_buckets API
+ Search
* Added the experimental knn_search API
* Searchable Snapshots
* Removed the deprecated searchable_snapshots.repository_stats
API
+ Snapshots
* Changed the snapshot.delete API to accept multiple snapshots
+ Security
* Added the security.enroll_kibana API
* Added the security.enroll_node API
-------------------------------------------------------------------
Mon May 23 12:08:05 UTC 2022 - pgajdos@suse.com

View File

@ -16,29 +16,32 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-elasticsearch
Version: 7.6.0
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/%{version}.tar.gz
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 certifi}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module pyaml}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests >= 2.0.0}
BuildRequires: %{python_module elastic-transport >= 8 with %python-elastic-transport < 9}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module urllib3 >= 1.21.1}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-certifi
Requires: python-urllib3 >= 1.21.1
Requires: (python-elastic-transport >= 8 with python-elastic-transport < 9)
BuildArch: noarch
# SECTION test
BuildRequires: %{python_module PyYAML >= 5.4}
BuildRequires: %{python_module aiohttp >= 3 with %python-aiohttp < 4}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module requests >= 2.4 with %python-requests < 3}
# /SECTION
%python_subpackages
%description
@ -47,10 +50,8 @@ ground for all Elasticsearch-related code in Python; because of this it tries
to be opinion-free and very extendable.
%prep
%setup -q -n elasticsearch-py-%{version}
rm README.rst
sed -i 's/from nose.plugins.skip import SkipTest/from unittest import SkipTest/' test_elasticsearch/test_helpers.py
%patch0 -p1
%autosetup -p1 -n elasticsearch-py-%{version}
sed -i '/addopts/d' setup.cfg
%build
%python_build
@ -60,11 +61,12 @@ sed -i 's/from nose.plugins.skip import SkipTest/from unittest import SkipTest/'
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest -rs
%pytest
%files %{python_files}
%license LICENSE
%doc AUTHORS Changelog.rst README
%{python_sitelib}/*
%doc README.rst
%{python_sitelib}/elasticsearch
%{python_sitelib}/elasticsearch-%{version}*-info
%changelog