20 Commits
Author SHA1 Message Date
Oleksandr LoykoandGitHub 4091816f84 Fixed lint error. (#875)
Signed-off-by: Alex Loyko <[email protected]>
2024-12-21 08:39:12 -05:00
12c379d32d Implement AsyncOpenSearch() parameter ssl_assert_hostname (#843)
* Implement AsyncOpenSearch() parameter `ssl_assert_hostname` to allow disabling SSL hostname verification

Signed-off-by: merlinz01 <[email protected]>

* Update PR link

Signed-off-by: merlinz01 <[email protected]>

* Add test

Signed-off-by: merlinz01 <[email protected]>

* Update docs

Signed-off-by: merlinz01 <[email protected]>

* Add test for default value

Signed-off-by: merlinz01 <[email protected]>

* Fix formatting

Signed-off-by: merlinz01 <[email protected]>

* Fix test failing on Python >3.12.7

Signed-off-by: merlinz01 <[email protected]>

* Fix formatting

Signed-off-by: merlinz01 <[email protected]>

---------

Signed-off-by: merlinz01 <[email protected]>
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
2024-11-16 08:29:10 -05:00
samypr100andGitHub 1269cdc95a feat(AsyncOpenSearch): consistent pool_maxsize setting (#845)
Signed-off-by: samypr100 <[email protected]>
2024-11-12 09:21:32 -05:00
55f9940d51 Remove HEAD-handling hack. (#794)
* remove HEAD -> GET workaround

Signed-off-by: dblock <[email protected]>

* Removed remaining HEAD-handling code.

Signed-off-by: dblock <[email protected]>

* Fixed remaining references to admin:admin.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
Co-authored-by: Vincent Castaneda <[email protected]>
2024-08-15 10:15:13 -04:00
Hugo van KemenadeandGitHub 6e3f1a1194 Remove redundant mock backport dependency and upgrade syntax for Python 3.8+ (#785)
* Upgrade syntax with pyupgrade --py38-plus

Signed-off-by: Hugo van Kemenade <[email protected]>

* Convert to f-strings with flynt

Signed-off-by: Hugo van Kemenade <[email protected]>

* Format with Black

Signed-off-by: Hugo van Kemenade <[email protected]>

* Remove redundant mock backport dependency

Signed-off-by: Hugo van Kemenade <[email protected]>

* isort imports

Signed-off-by: Hugo van Kemenade <[email protected]>

* Add changelog entry

Signed-off-by: Hugo van Kemenade <[email protected]>

---------

Signed-off-by: Hugo van Kemenade <[email protected]>
2024-07-20 16:19:20 -04:00
odelmarcelleandGitHub 3eba72c320 Reusable async client (#639)
* set aiohttp.ClientSession to None after close()

Signed-off-by: odlmarce <[email protected]>

* add test

Signed-off-by: odlmarce <[email protected]>

* update changelog

Signed-off-by: odlmarce <[email protected]>

* update changelog + format
Signed-off-by: odlmarce <[email protected]>

* update changelog
Signed-off-by: odlmarce <[email protected]>

* add tests using `with` and synchronous client
Signed-off-by: odlmarce <[email protected]>

* fix `urllib3.exceptions.ClosedPoolError` breaking synchronous client after `close`
Signed-off-by: odlmarce <[email protected]>

* update changelog
Signed-off-by: odlmarce <[email protected]>

* separate tests
Signed-off-by: odlmarce <[email protected]>

* refactor pool factory as lambda
Signed-off-by: odlmarce <[email protected]>

---------

Signed-off-by: odlmarce <[email protected]>
2024-01-02 13:33:24 -05:00
Samuel OrjiandGitHub 6f26eb3e8e remove unnecessary utf-8 header in .py files (#615)
* remove unnecessary utf-8 header in .py files

Signed-off-by: samuel orji <[email protected]>

* review feedback: add link to changelog

Signed-off-by: samuel orji <[email protected]>

---------

Signed-off-by: samuel orji <[email protected]>
2023-11-24 16:19:50 -05:00
Daniel (dB.) DoubrovkineandGitHub f02d6dee27 Avoid decoding request body unless it needs to be logged. (#571)
Signed-off-by: dblock <[email protected]>
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
2023-11-12 11:42:45 -08:00
Daniel (dB.) DoubrovkineandGitHub 58b83d8c06 Added Windows CI. (#569)
Signed-off-by: dblock <[email protected]>
2023-11-09 17:41:37 -08:00
56606ed541 Set enable_cleanup_closed=True to drop TLS connections without a shutdown (#468)
* Set enable_cleanup_closed=True to drop TLS connections without a shutdown

AsyncOpenSearch seems to leak TLS connections due to a missing parameter in `aiohttp.TCPConnector`. This causes #172 and was also fixed "upstream" in this issue https://github.com/elastic/elasticsearch-py/issues/1910. 

Signed-off-by: Sandor Nemes <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Sandor Nemes <[email protected]>

---------

Signed-off-by: Sandor Nemes <[email protected]>
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
2023-11-09 18:52:10 -05:00
Daniel (dB.) DoubrovkineandGitHub 56c96d7c4f Expanded type coverage to benchmarks, samples and tests. (#566)
* Renamed json samples to fix duplicate module name.

Signed-off-by: dblock <[email protected]>

* Enabled mypy on all source files.

Signed-off-by: dblock <[email protected]>

* Added missing types.

Signed-off-by: dblock <[email protected]>

* Added CHANGELOG.

Signed-off-by: dblock <[email protected]>

* Move type: ignore to fix untyped decorator makes function untyped.

Signed-off-by: dblock <[email protected]>

* Fix nox -rs lint-3.7.

Signed-off-by: dblock <[email protected]>

* Fixed incorrect import.

Signed-off-by: dblock <[email protected]>

* Fix broken test.

Signed-off-by: dblock <[email protected]>

* Fixed TestBulk::test_bulk_works_with_bytestring_body.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
2023-11-09 10:51:20 -05:00
Daniel (dB.) DoubrovkineandGitHub dcb79cc322 Merge .pyi type stubs inline (#563)
* Merged types into .py code.

Signed-off-by: dblock <[email protected]>

* Fix: nox -rs generate.

Signed-off-by: dblock <[email protected]>

* Updated CHANGELOG.

Signed-off-by: dblock <[email protected]>

* Use lowest common python version for lint.

Signed-off-by: dblock <[email protected]>

* Fix: don't typeshed.

Signed-off-by: dblock <[email protected]>

* Removed unneeded comment.

Signed-off-by: dblock <[email protected]>

* Simplify OPENSEARCH_URL.

Signed-off-by: dblock <[email protected]>

* Fix: positional ignore_status used as chunk_size.

Signed-off-by: dblock <[email protected]>

* Fix: parse version string.

Signed-off-by: dblock <[email protected]>

* Remove future annotations for Python 3.6.

Signed-off-by: dblock <[email protected]>

* Fix: types in documentation.

Signed-off-by: dblock <[email protected]>

* Improve CHANGELOG text.

Signed-off-by: dblock <[email protected]>

* Re-added missing separator.

Signed-off-by: dblock <[email protected]>

* Remove duplicate licenses.

Signed-off-by: dblock <[email protected]>

* Get rid of Optional[Any].

Signed-off-by: dblock <[email protected]>

* Fix docs with AsyncOpenSearch.

Signed-off-by: dblock <[email protected]>

* Fix: undo comment.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
2023-11-06 10:08:19 -08:00
Daniel (dB.) DoubrovkineandGitHub 0da60b2623 Added a utf-8 header to all .py files (#557)
Signed-off-by: dblock <[email protected]>
2023-10-26 13:34:34 -04:00
Michael OliverandGitHub 4dba35deea Allow passing trust_env to aiohttp.ClientSession (#438)
Fixes #368

Signed-off-by: Michael Oliver <[email protected]>
2023-07-19 09:02:04 -04:00
gg-kialoandGitHub 707373e369 Include parsed error info in TransportError in async connections (#226)
Passing the Content-Type to `_raise_errors` will cause the json body to
be parsed and included in the `TransportError`.

This matches the behaviour of the sync client.

Fixes #225

Signed-off-by: Gordon Govan <[email protected]>
2023-05-09 15:16:03 -04:00
Sai Medhini Reddy MaryadaandGitHub 7d83a69494 Adding explicit parameters for AIOHttpConnection and AsyncTransport (#276)
Signed-off-by: saimedhi <[email protected]>

Signed-off-by: saimedhi <[email protected]>
2023-01-19 15:15:35 -08:00
2672f3f572 Check OpenSSL environment variables before defaulting to certifi (#196)
* Check OpenSSL environment variables before defaulting to certifi

Signed-off-by: Roger Aiudi <[email protected]>

* Fix formatting

Signed-off-by: Roger Aiudi <[email protected]>

* Moved CA_CERTS to the base Connection module

Signed-off-by: Roger Aiudi <[email protected]>

* Updated requests Connection to use common CA_CERTS by default

Signed-off-by: Roger Aiudi <[email protected]>

* Pass nox linting

Signed-off-by: Roger Aiudi <[email protected]>

* Update CHANGELOG.md and USER_GUIDE.md

Signed-off-by: Roger Aiudi <[email protected]>

* Updated AIOHttpConnection to only load CA_CERTS if verify_certs is True

Signed-off-by: Roger Aiudi <[email protected]>

* Added test cases for CA_CERTS handling in each Connection implementation

Signed-off-by: Roger Aiudi <[email protected]>

* Move CA cert handling to Connection.default_ca_certs()
Add test cases for the different CA cert configurations

Signed-off-by: Roger Aiudi <[email protected]>

* Update actions to test unsupported Python versions on ubuntu-20.04

Signed-off-by: Roger Aiudi <[email protected]>

* Fix Python versions being interpreted as floats

Signed-off-by: Roger Aiudi <[email protected]>

* Workaround Monkeypatch not available on old pytest versions

Signed-off-by: Roger Aiudi <[email protected]>

Signed-off-by: Roger Aiudi <[email protected]>
Co-authored-by: Harsha Vamsi Kalluri <[email protected]>
2022-11-22 11:33:45 -05:00
2d03dc773b Alerting Plugins (#93)
* Alert Plugin

Signed-off-by: Arnav Das <[email protected]>

* lint file header license

Signed-off-by: Arnav Das <[email protected]>

* Tests For Alerting[Monitors]

Signed-off-by: Arnav Das <[email protected]>

* Tests For Alerting[Destinations]

Signed-off-by: Arnav Das <[email protected]>

* dynamic lookup 90#issuecomment-1003396742

Signed-off-by: Arnav Das <[email protected]>

* Alerting Async

Signed-off-by: Arnav Das <[email protected]>

* Lint Changes

Signed-off-by: Arnav Das <[email protected]>

* alerting plugins integration tests

Signed-off-by: Arnav Das <[email protected]>

* Integ UnitTests Skip on OPENSEARCH_VERSION >= 2.0.0

Signed-off-by: Arnav Das <[email protected]>

* Unit Test Skip Complete

Signed-off-by: Arnav Das <[email protected]>

* License Headers fixed

Signed-off-by: Arnav Das <[email protected]>

* test_urllib3_connection timeout

Signed-off-by: Arnav Das <[email protected]>

* lint

Signed-off-by: Arnav Das <[email protected]>

* Fix licenses in all files

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Remove elastic search licenses on new files

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Fix formatting

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

Signed-off-by: Arnav Das <[email protected]>
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
Co-authored-by: Harsha Vamsi Kalluri <[email protected]>
2022-10-03 14:45:18 -04:00
Shivam DharandShivam Dhar cfe1190a22 removes elastic support from opensearch-py library
Signed-off-by: Shivam Dhar <[email protected]>
2022-01-05 22:22:43 +05:30
Rushi Agrawal ef0c23c0e4 Rename module to opensearchpy
To avoid conflict with an existing package by name 'opensearch' being
present

Signed-off-by: Rushi Agrawal <[email protected]>
2021-09-16 21:23:38 +05:30