Removed 'out/opensearchpy' folder which was produced while generating pyi files for plugins (#288)

Signed-off-by: saimedhi <saimedhi@amazon.com>
This commit is contained in:
Sai Medhini Reddy Maryada
2023-02-14 11:09:14 -08:00
committed by GitHub
parent 3d1dd7bbce
commit 93636399ec
10 changed files with 3 additions and 110 deletions
+1
View File
@@ -41,6 +41,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Removed
- Removed patch versions in integration tests for OpenSearch 1.0.0 - 2.3.0 to reduce Github Action jobs ([#262](https://github.com/opensearch-project/opensearch-py/pull/262))
- Removed 'out/opensearchpy' folder which was produced while generating pyi files for plugins ([#288](https://github.com/opensearch-project/opensearch-py/pull/288))
### Fixed
- Fixed DeprecationWarning emitted from urllib3 1.26.13+ ([#246](https://github.com/opensearch-project/opensearch-py/pull/246))
### Security
-4
View File
@@ -143,7 +143,6 @@ async def async_streaming_bulk(
*args,
**kwargs
):
"""
Streaming bulk consumes actions from the iterable passed in and yields
results per action. For non-streaming usecases use
@@ -185,7 +184,6 @@ async def async_streaming_bulk(
async for bulk_data, bulk_actions in _chunk_actions(
map_actions(), chunk_size, max_chunk_bytes, client.transport.serializer
):
for attempt in range(max_retries + 1):
to_retry, to_retry_data = [], []
if attempt:
@@ -207,7 +205,6 @@ async def async_streaming_bulk(
**kwargs,
),
):
if not ok:
action, info = info.popitem()
# retry if retries enabled, we get 429, and we are not
@@ -422,7 +419,6 @@ async def async_reindex(
scan_kwargs={},
bulk_kwargs={},
):
"""
Reindex all documents from one index that satisfy a given query
to another, potentially (if `target_client` is specified) on a different cluster.
-1
View File
@@ -160,7 +160,6 @@ class AsyncTransport(Transport):
# ... and we can start sniffing in the background.
if self.sniffing_task is None and self.sniff_on_start:
# Create an asyncio.Event for future calls to block on
# until the initial sniffing task completes.
self._sniff_on_start_event = asyncio.Event()
-1
View File
@@ -196,7 +196,6 @@ class AsyncHttpConnection(AIOHttpConnection):
start = self.loop.time()
try:
async with self.session.request(
method,
url,
-4
View File
@@ -280,7 +280,6 @@ def streaming_bulk(
*args,
**kwargs
):
"""
Streaming bulk consumes actions from the iterable passed in and yields
results per action. For non-streaming usecases use
@@ -319,7 +318,6 @@ def streaming_bulk(
for bulk_data, bulk_actions in _chunk_actions(
actions, chunk_size, max_chunk_bytes, client.transport.serializer
):
for attempt in range(max_retries + 1):
to_retry, to_retry_data = [], []
if attempt:
@@ -339,7 +337,6 @@ def streaming_bulk(
**kwargs
),
):
if not ok:
action, info = info.popitem()
# retry if retries enabled, we get 429, and we are not
@@ -621,7 +618,6 @@ def reindex(
scan_kwargs={},
bulk_kwargs={},
):
"""
Reindex all documents from one index that satisfy a given query
to another, potentially (if `target_client` is specified) on a different cluster.
+2 -1
View File
@@ -197,13 +197,14 @@ class Transport(object):
:arg hosts: same as `__init__`
"""
# construct the connections
def _create_connection(host):
# if this is not the initial setup look at the existing connection
# options and identify connections that haven't changed and can be
# kept around.
if hasattr(self, "connection_pool"):
for (connection, old_host) in self.connection_pool.connection_opts:
for connection, old_host in self.connection_pool.connection_opts:
if old_host == host:
return connection
-16
View File
@@ -1,16 +0,0 @@
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.
from ..plugins.alerting import AlertingClient as AlertingClient
from .utils import NamespacedClient as NamespacedClient
from typing import Any
class PluginsClient(NamespacedClient):
alerting: Any
def __init__(self, client) -> None: ...
-8
View File
@@ -1,8 +0,0 @@
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.
-73
View File
@@ -1,73 +0,0 @@
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.
from ..client.utils import (
NamespacedClient as NamespacedClient,
query_params as query_params,
)
from typing import Any, Union
class AlertingClient(NamespacedClient):
def search_monitor(
self, body, params: Any | None = ..., headers: Any | None = ...
) -> Union[bool, Any]: ...
def get_monitor(
self, monitor_id, params: Any | None = ..., headers: Any | None = ...
) -> Union[bool, Any]: ...
def run_monitor(
self, monitor_id, params: Any | None = ..., headers: Any | None = ...
) -> Union[bool, Any]: ...
def create_monitor(
self,
body: Any | None = ...,
params: Any | None = ...,
headers: Any | None = ...,
) -> Union[bool, Any]: ...
def update_monitor(
self,
monitor_id,
body: Any | None = ...,
params: Any | None = ...,
headers: Any | None = ...,
) -> Union[bool, Any]: ...
def delete_monitor(
self, monitor_id, params: Any | None = ..., headers: Any | None = ...
) -> Union[bool, Any]: ...
def get_destination(
self,
destination_id: Any | None = ...,
params: Any | None = ...,
headers: Any | None = ...,
) -> Union[bool, Any]: ...
def create_destination(
self,
body: Any | None = ...,
params: Any | None = ...,
headers: Any | None = ...,
) -> Union[bool, Any]: ...
def update_destination(
self,
destination_id,
body: Any | None = ...,
params: Any | None = ...,
headers: Any | None = ...,
) -> Union[bool, Any]: ...
def delete_destination(
self, destination_id, params: Any | None = ..., headers: Any | None = ...
) -> Union[bool, Any]: ...
def get_alerts(
self, params: Any | None = ..., headers: Any | None = ...
) -> Union[bool, Any]: ...
def acknowledge_alert(
self,
monitor_id,
body: Any | None = ...,
params: Any | None = ...,
headers: Any | None = ...,
) -> Union[bool, Any]: ...
@@ -530,7 +530,6 @@ class TestScan(object):
),
):
with patch.object(async_client, "scroll", MockScroll()):
data = [
x
async for x in helpers.async_scan(
@@ -554,7 +553,6 @@ class TestScan(object):
),
):
with patch.object(async_client, "scroll", MockScroll()) as mock_scroll:
with pytest.raises(ScanError):
data = [
x