influxdb-client-python icon indicating copy to clipboard operation
influxdb-client-python copied to clipboard

urllib3 v2.0.3 Deprecation Warnings on `HTTPResponse.getheader()` and `HTTPResponse.getheaders()`

Open swssl opened this issue 1 year ago • 4 comments

Specifications

  • Client Version: 1.37.0
  • InfluxDB Version: 2.0.0
  • Platform: InfluxDB Cloud

Code sample to reproduce problem

Every call of HTTPResponse.getheader() and HTTPResponse.getheaders().

Expected behavior

Work without Deprecation Warnings.

Actual behavior

The following warnings are raised:

  • HTTPResponse.getheader() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default).
  • HTTPResponse.getheaders() is deprecated and will be removed in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.

Additional info

See https://github.com/urllib3/urllib3/blob/53368dfe6609aec8f3d933b62021cf568f24b794/src/urllib3/response.py#L478C6-L478C6 for warning origin.

swssl avatar Aug 17 '23 11:08 swssl

Hi @swssl,

thanks for using our client.

Is this something you would be willing to help with? All PR is welcome and we will be happy to review your submission.

Regards

bednar avatar Aug 21 '23 09:08 bednar

Hi @bednar , thanks for your reply. Unfortunately, i won't be available to work on this on short notice but i'll keep it in mind.

swssl avatar Aug 22 '23 07:08 swssl

Hey all, FYI, urllib3 v2.1.0 was released last week: https://github.com/urllib3/urllib3/releases/tag/2.1.0 As far as I can tell, it doesnt contain the changes the warning is about. @bednar Maybe I will be able to work on this in the end of January.

swssl avatar Nov 20 '23 16:11 swssl

@swssl, thanks 🙏

bednar avatar Nov 21 '23 04:11 bednar