From 53867097d45e495801eff9d399532ec2613c557d Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Fri, 25 Nov 2022 05:30:12 +0100 Subject: [PATCH 1/2] refactor: use `HTTResponse.headers` instead deprecated `HTTPResponse.getheaders()` --- influxdb_client/_sync/rest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb_client/_sync/rest.py b/influxdb_client/_sync/rest.py index bac94f9e..e29209c3 100644 --- a/influxdb_client/_sync/rest.py +++ b/influxdb_client/_sync/rest.py @@ -43,7 +43,7 @@ def __init__(self, resp): def getheaders(self): """Return a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.urllib3_response.headers def getheader(self, name, default=None): """Return a given response header.""" From 9576138961ec3ca4610621ec63d6e8563e6be234 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Fri, 25 Nov 2022 05:33:15 +0100 Subject: [PATCH 2/2] refactor: use `HTTResponse.headers` instead deprecated `HTTPResponse.getheaders()` --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b01478ec..25786ad3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### Bug Fixes 1. [#526](https://github.com/influxdata/influxdb-client-python/pull/526): Creating client instance from static configuration 1. [#531](https://github.com/influxdata/influxdb-client-python/pull/531): HTTP request return type for Management API [async/await] +1. [#534](https://github.com/influxdata/influxdb-client-python/pull/534): Use `HTTResponse.headers` to clear deprecation warning [urllib3] ### CI 1. [#523](https://github.com/influxdata/influxdb-client-python/pull/523): Add Python 3.11 to CI builds