diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c509036..730a45e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Removed ### Fixed - +- Fixed DeprecationWarning emitted from urllib3 1.26.13+ ([#246](https://github.com/opensearch-project/opensearch-py/pull/246)) ### Security diff --git a/opensearchpy/connection/http_urllib3.py b/opensearchpy/connection/http_urllib3.py index 51a4f2d9..6fc09e72 100644 --- a/opensearchpy/connection/http_urllib3.py +++ b/opensearchpy/connection/http_urllib3.py @@ -273,7 +273,7 @@ class Urllib3HttpConnection(Connection): method, full_url, url, orig_body, response.status, raw_data, duration ) - return response.status, response.getheaders(), raw_data + return response.status, response.headers, raw_data def get_response_headers(self, response): return {header.lower(): value for header, value in response.headers.items()}