Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
swssl opened this issue Aug 17, 2023 · 4 comments · Fixed by #655
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@swssl
Copy link

swssl commented Aug 17, 2023

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 swssl added the bug Something isn't working label Aug 17, 2023
@bednar
Copy link
Contributor

bednar commented Aug 21, 2023

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

@swssl
Copy link
Author

swssl commented Aug 22, 2023

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
Copy link
Author

swssl commented Nov 20, 2023

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.

@bednar
Copy link
Contributor

bednar commented Nov 21, 2023

@swssl, thanks 🙏

@bednar bednar added this to the 1.43.0 milestone May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants