Commit Graph

137 Commits

Author SHA1 Message Date
Hugo van Kemenade de96d28e45 Remove redundant six dependency (#781)
* Don't create universal wheel for Python 3 only

Signed-off-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

* Update Black target version to match min Python supported

Signed-off-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

* Upgrade files using six to Python 3 syntax

Signed-off-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

* Remove redundant six dependency

Signed-off-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

* Format with Black

Signed-off-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

* Add changelog entry

Signed-off-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

---------

Signed-off-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-07-20 12:30:37 -04:00
Sai Medhini Reddy Maryada 343690ad63 Bumps aiohttp from >=3.9.2,<4 to >=3.9.4,<4 (#751)
Signed-off-by: saimedhi <saimedhi@amazon.com>
2024-05-22 16:56:39 -04:00
Ihor Herasymenko 54ad04d37e Add support for urllib3 v2 (#719)
Signed-off-by: Ihor Herasymenko <ihor.herasymenko@ada.support>
2024-04-22 13:58:50 -04:00
Sai Medhini Reddy Maryada 58e9b1d66c Introduced service time metrics to OpenSearch-Py client. (#716)
* Introduced service time metrics to opensearch-py client

Signed-off-by: saimedhi <saimedhi@amazon.com>

* Introduced service time metrics to opensearch-py client

Signed-off-by: saimedhi <saimedhi@amazon.com>

* Introduced service time metrics to opensearch-py client

Signed-off-by: saimedhi <saimedhi@amazon.com>

* Added service time metrics

Signed-off-by: saimedhi <saimedhi@amazon.com>

---------

Signed-off-by: saimedhi <saimedhi@amazon.com>
Signed-off-by: Sai Medhini Reddy Maryada <117196660+saimedhi@users.noreply.github.com>
2024-04-15 07:20:46 -04:00
Sai Medhini Reddy Maryada ba715b9d3f Dropped support for python 3.6, 3.7 and added support for python 3.12 (#717)
Signed-off-by: saimedhi <saimedhi@amazon.com>
2024-04-06 11:18:47 -04:00
Mark Cohen 0ddbf8cafa Pylint integration updates (#643)
* updated files with docstrings to pass pylint

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* updated samples to prepare for enabling missing-docstring linter; will continue to work on this before committing setup.cfg

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* removed missing-function-docstring from setup.cfg so the linter doesn't fail while work on docstrings continues

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* corrected unnecessary return docstring values

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* fixing failure in 'black' on reformatting

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* updated utils to pass missing-function-docstring tests

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* updated functions with missing docstrings or pylint ignore instructions; added a utility to automatically add these ignore instructions to most functions that should be self-describing; rolled back some automatically generated code mistakenly changed

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* * ignoring opensearchpy for pylint and then added it back to noxfile.py
* fixed some lints; created a feature flag for newer dynamic pylint so now lints can be fixed first in legacy code and then enabled by multiple people
* extracted a method for per-folder linting
* updated noxfile.lint_per_folder with type hints
* enabled unspecified-encoding in pylint
* added disable missing-function-docstring pragma to test_clients.py in test_async and test_server
* added more encodings to pass unspecified-encoding pylint tests
* updated changelog
Signed-off-by: Mark Cohen <markcoh@amazon.com>

* updated CHANGELOG.md entry
removed the feature flag for pylint lint_per_folder
fixed failures from mypy and pylint
removed pylint MESSAGE CONTROL config from setup.cfg after relocating to lint_per_folder method
Signed-off-by: Mark Cohen <markcoh@amazon.com>

* removed pylint ignore missing-function-docstring

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* added pylint.extensions.docparams plugin

updated some docstrings to correct parameters

removed pylint from setup.cfg

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* added four lints for opensearchpy/

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* adding await back to client.info() call

Signed-off-by: Mark Cohen <markcoh@amazon.com>

* updated TODOs as requested

renamed test_opensearchpy.test_async.test_server.test_helpers.conftest.setup_ubq_tests to setup_update_by_query_tests

added
OpenSearch-main/rest-api-spec/src/main/resources/rest-api-spec/test/indices/stats/50_noop_update[0]
to skip tests list

run_tests.py catches a CalledProcessError when the git repo already exists and the command to add the origin fails in fetch_opensearch_repo()

Signed-off-by: Mark Cohen <markcoh@amazon.com>

---------

Signed-off-by: Mark Cohen <markcoh@amazon.com>
2024-01-19 13:36:05 -05:00
Sai Medhini Reddy Maryada e323ab2435 Bumps urllib3 from >=1.26.18 to >=1.26.18, <2 (#632)
Signed-off-by: saimedhi <saimedhi@amazon.com>
2023-12-15 10:41:29 -05:00
Samuel Orji 6f26eb3e8e remove unnecessary utf-8 header in .py files (#615)
* remove unnecessary utf-8 header in .py files

Signed-off-by: samuel orji <awesomeorji@gmail.com>

* review feedback: add link to changelog

Signed-off-by: samuel orji <awesomeorji@gmail.com>

---------

Signed-off-by: samuel orji <awesomeorji@gmail.com>
2023-11-24 16:19:50 -05:00
Daniel (dB.) Doubrovkine 1801ada270 Added pylint, enforce naming. (#590)
* Added pylint.

Signed-off-by: dblock <dblock@amazon.com>

* Enforce pylint:invalid-name.

Signed-off-by: dblock <dblock@amazon.com>

* Updated the generated code header to prevent broken links.

Signed-off-by: dblock <dblock@amazon.com>

* Swapped order of messages.

Signed-off-by: dblock <dblock@amazon.com>

---------

Signed-off-by: dblock <dblock@amazon.com>
2023-11-21 10:04:39 -08:00
Daniel (dB.) Doubrovkine 4874437fb5 Fix: version number in filename for distribution. (#588)
Signed-off-by: dblock <dblock@amazon.com>
2023-11-15 15:03:06 -05:00
dependabot[bot] da436cbbe8 Update coverage requirement from <7.0.0 to <8.0.0 (#578)
* Update coverage requirement from <7.0.0 to <8.0.0

Updates the requirements on [coverage](https://github.com/nedbat/coveragepy) to permit the latest version.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](https://github.com/nedbat/coveragepy/compare/coverage-3.0b1...7.3.2)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
2023-11-13 08:56:06 -05:00
DJ Carrillo 7878364cf0 Removed EOL Python 3.6. Bumped urllib3 to 1.26.18 to patch sec vulnerability. (#576)
Updated change log.

Signed-off-by: Djcarrillo6 <djcarrillo6@yahoo.com>
2023-11-12 10:22:54 -05:00
Daniel (dB.) Doubrovkine f410e81d80 Fix: build and deploy docs. (#575)
* Fix: build and deploy docs.

Signed-off-by: dblock <dblock@amazon.com>

* Run nox -rs generate.

Signed-off-by: dblock <dblock@amazon.com>

---------

Signed-off-by: dblock <dblock@amazon.com>
2023-11-11 14:28:43 -08:00
Daniel (dB.) Doubrovkine dcb79cc322 Merge .pyi type stubs inline (#563)
* Merged types into .py code.

Signed-off-by: dblock <dblock@amazon.com>

* Fix: nox -rs generate.

Signed-off-by: dblock <dblock@amazon.com>

* Updated CHANGELOG.

Signed-off-by: dblock <dblock@amazon.com>

* Use lowest common python version for lint.

Signed-off-by: dblock <dblock@amazon.com>

* Fix: don't typeshed.

Signed-off-by: dblock <dblock@amazon.com>

* Removed unneeded comment.

Signed-off-by: dblock <dblock@amazon.com>

* Simplify OPENSEARCH_URL.

Signed-off-by: dblock <dblock@amazon.com>

* Fix: positional ignore_status used as chunk_size.

Signed-off-by: dblock <dblock@amazon.com>

* Fix: parse version string.

Signed-off-by: dblock <dblock@amazon.com>

* Remove future annotations for Python 3.6.

Signed-off-by: dblock <dblock@amazon.com>

* Fix: types in documentation.

Signed-off-by: dblock <dblock@amazon.com>

* Improve CHANGELOG text.

Signed-off-by: dblock <dblock@amazon.com>

* Re-added missing separator.

Signed-off-by: dblock <dblock@amazon.com>

* Remove duplicate licenses.

Signed-off-by: dblock <dblock@amazon.com>

* Get rid of Optional[Any].

Signed-off-by: dblock <dblock@amazon.com>

* Fix docs with AsyncOpenSearch.

Signed-off-by: dblock <dblock@amazon.com>

* Fix: undo comment.

Signed-off-by: dblock <dblock@amazon.com>

---------

Signed-off-by: dblock <dblock@amazon.com>
2023-11-06 10:08:19 -08:00
Daniel (dB.) Doubrovkine 627e717534 Remove support for Python 2.x. (#548)
Signed-off-by: dblock <dblock@amazon.com>
2023-10-24 07:57:21 -07:00
DJ Carrillo 62b408bbd1 Removed EOL Python3.5 & bumped urllib3 version to patch security vulnerability (#533)
Updated CHANGELOG with pull #



Updated CHANGELOG with pull #



Updated CHANGELOG removed section.



Updated CHANGELOG removed section again

Signed-off-by: Djcarrillo6 <djcarrillo6@yahoo.com>
2023-10-12 14:11:21 -07:00
Sai Medhini Reddy Maryada 781744c6b1 Bumps from >=1.21.1 to >=1.26.9 (#518)
Signed-off-by: saimedhi <saimedhi@amazon.com>
2023-10-03 10:41:41 -04:00
Sai Medhini Reddy Maryada c104ae52b3 Bumps urllib3 (#466)
Signed-off-by: saimedhi <saimedhi@amazon.com>
2023-08-02 17:46:49 -04:00
Sai Medhini Reddy Maryada b26e2f37c1 Fixed CVE - issue 86 mentioned in opensearch-dsl-py repo (#295)
Signed-off-by: saimedhi <saimedhi@amazon.com>
2023-02-16 15:10:03 -08:00
Sai Medhini Reddy Maryada c58375aa7b Merging opensearch-dsl-py to opensearch-py (#287)
Signed-off-by: saimedhi <saimedhi@amazon.com>
2023-02-14 15:03:56 -08:00
psaiz d6e994a411 Example of authenticating with kerberos (#214)
Signed-off-by: Pablo Saiz <pablo.saiz@cern.ch>

Signed-off-by: Pablo Saiz <pablo.saiz@cern.ch>
Co-authored-by: Pablo Saiz <pablo.saiz@cern.ch>
Co-authored-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
2022-12-01 11:22:49 -08:00
Arnav Das 2d03dc773b Alerting Plugins (#93)
* Alert Plugin

Signed-off-by: Arnav Das <arnav.das88@gmail.com>

* lint file header license

Signed-off-by: Arnav Das <arnav.das88@gmail.com>

* Tests For Alerting[Monitors]

Signed-off-by: Arnav Das <arnav.das88@gmail.com>

* Tests For Alerting[Destinations]

Signed-off-by: Arnav Das <arnav.das88@gmail.com>

* dynamic lookup 90#issuecomment-1003396742

Signed-off-by: Arnav Das <arnav.das88@gmail.com>

* Alerting Async

Signed-off-by: Arnav Das <arnav.das88@gmail.com>

* Lint Changes

Signed-off-by: Arnav Das <arnav.das88@gmail.com>

* alerting plugins integration tests

Signed-off-by: Arnav Das <arnav.das88@gmail.com>

* Integ UnitTests Skip on OPENSEARCH_VERSION >= 2.0.0

Signed-off-by: Arnav Das <arnav.das88@gmail.com>

* Unit Test Skip Complete

Signed-off-by: Arnav Das <arnav.das88@gmail.com>

* License Headers fixed

Signed-off-by: Arnav Das <arnav.das88@gmail.com>

* test_urllib3_connection timeout

Signed-off-by: Arnav Das <arnav.das88@gmail.com>

* lint

Signed-off-by: Arnav Das <arnav.das88@gmail.com>

* Fix licenses in all files

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Remove elastic search licenses on new files

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

* Fix formatting

Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>

Signed-off-by: Arnav Das <arnav.das88@gmail.com>
Signed-off-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
Co-authored-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
2022-10-03 14:45:18 -04:00
Sam Foster fe1730a88b Move requests to install_requires (#142)
Signed-off-by: Sam Foster <sfoster.ka@gmail.com>
2022-03-29 11:39:47 -04:00
Shivam Dhar 6ab90be906 adds IAM auth support
Signed-off-by: Shivam Dhar <dhshivam@amazon.com>
2022-03-09 13:12:45 -08:00
PhilipMay 19be5802ea add sphinx
Signed-off-by: Philip May <philip@may.la>
2022-02-08 11:39:58 -08:00
Denis Zalevskiy 67eb5ebe95 Update package documentation URL (#83)
So it points to the right location.

Fixes #81

Signed-off-by: Denis Zalevskiy <dez@aiven.io>
2021-12-13 16:53:37 +02:00
Rushi Agrawal eaa0cd8765 Update setup.py to correctly pick up Python files
And also re-update package name in utils/build-dists.py so that it is
uninstalled successfully

Signed-off-by: Rushi Agrawal <rushi.agr@gmail.com>
2021-09-19 18:18:09 -07:00
Rushi Agrawal ef88f43a72 Update package name to opensearch-py (#72)
Since opensearch is already taken, update distribution name to opensearch-py.
Update build utils accordingly to fix package name change.

Signed-off-by: Rushi Agrawal <rushi.agr@gmail.com>
2021-09-16 13:51:57 -07:00
Rushi Agrawal ef0c23c0e4 Rename module to opensearchpy
To avoid conflict with an existing package by name 'opensearch' being
present

Signed-off-by: Rushi Agrawal <rushi.agr@gmail.com>
2021-09-16 21:23:38 +05:30
Peter Nied 474ddb2ffb Ready readme for distribution
Signed-off-by: Peter Nied <petern@amazon.com>
2021-08-31 22:54:20 +05:30
Rushi Agrawal 1c539d1255 Add all maintainers as authors and maintainers in setup.py
Signed-off-by: Rushi Agrawal <rushi.agr@gmail.com>
2021-08-26 11:49:50 +05:30
Rushi Agrawal 6fcc78a58c Replace elastic maintainers with Rushi (#49)
Rushi is added as temporary maintainer for now. Should ideally be
replaced with an email list

Also removed doc requirements, doc job, and updated description to mention
'low-level' client explicitly

Signed-off-by: Rushi Agrawal <rushi.agr@gmail.com>
2021-08-20 21:58:19 +03:00
Aleksei Atavin 497468f254 Rename setup description Elasticsearch -> OpenSearch (#42)
Signed-off-by: Aleksei Atavin <axeo@aiven.io>
2021-08-19 10:41:16 +03:00
Rushi Agrawal 9e9269c8f3 Rename Elasticsearch -> OpenSearch
Signed-off-by: Rushi Agrawal <rushi.agr@gmail.com>
2021-08-19 07:58:20 +05:30
Shephali Mittal 924d71729a Add SPDX and OpenSearch Modification license header
Signed-off-by: Shephali Mittal <shephalm@amazon.com>
2021-08-10 19:36:47 +05:30
Shephali Mittal 18b39afcbf Fix Broken README
Signed-off-by: Shephali Mittal <shephalm@amazon.com>
2021-08-06 11:49:30 +05:30
Seth Michael Larson 54a1d56870 [7.x] Reorganize API documentation 2021-04-26 10:14:29 -05:00
Seth Michael Larson a728aaa491 [7.x] Sort imports with isort and regenerate APIs 2021-01-13 14:21:04 -06:00
Seth Michael Larson 708e282eaf [7.x] Actually dockerize repo, update build-dists for release manager 2020-11-04 13:58:42 -06:00
Seth Michael Larson 2ce9fd3914 [7.x] Test typing metadata in build-dist script 2020-10-20 15:22:43 -05:00
github-actions[bot] 0cdeeb654a [7.x] Remove yarl from [async] extra
Co-authored-by: Seth Michael Larson <seth.larson@elastic.co>
2020-10-13 15:18:07 -05:00
Seth Michael Larson 9b8cee0199 [7.x] Add .ci/make.sh script for building releases
Co-authored-by: Seth Michael Larson <seth.larson@elastic.co>
2020-10-12 16:42:23 -05:00
Seth Michael Larson f6d2da6740 Switch version to '7.10.0.dev0' 2020-10-07 11:07:14 -05:00
Seth Michael Larson 6daa14315a [7.x] Add typing metadata and manual types to package 2020-09-28 15:49:14 -05:00
Seth Michael Larson b7bc181cc0 [7.x] Add project_urls to setup.py 2020-07-20 10:41:15 -05:00
Seth Michael Larson b13c7c6217 [7.x] Switch to long Apache-2.0 license header 2020-07-02 13:15:25 -05:00
Seth Michael Larson dbac4cac6a [7.x] Add support for Python 3.9 2020-07-01 12:42:34 -05:00
Seth Michael Larson 02e3323650 [7.x] Add AIOHttpConnection 2020-05-21 11:36:21 -05:00
Seth Michael Larson eaff4af910 [7.x] Switch to Pytest as default runner 2020-05-19 14:18:53 -05:00
Seth Michael Larson f8b005f62e Update 7.x REST APIs 2020-05-19 14:18:53 -05:00