Skip to content

Conversation

izeye
Copy link
Contributor

@izeye izeye commented Aug 19, 2023

Problem

See gh-125

Solution

This PR simply replaces the deprecated HTTPResponse.getheader() usages with the suggested HTTResponse.headers.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: Replacing deprecated usages

Test Plan

Describe specific steps for validating this change.

Copy link
Collaborator

@jhamon jhamon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some manual testing with this change and everything seems to still work as expected. Thanks for helping us update this.

@jhamon jhamon merged commit d0c434f into pinecone-io:main Aug 21, 2023
@izeye izeye deleted the gh-125 branch August 21, 2023 19:50
tdonia added a commit that referenced this pull request Aug 24, 2023
## Problem

Follow up to #195, which updated to use `urllib.headers` -- there's also
a deprecation for `getheader` coming:
urllib3/urllib3#2814

## Solution

Updated the call in `rest.py` to use `.get` instead of `.getheader`;
based on the
[code](https://github.com/urllib3/urllib3/blob/1.2.1/urllib3/response.py#L191C29-L191C32)
this should be compatible with 1.2.1, [our current min
version](https://github.com/pinecone-io/pinecone-python-client/blob/main/requirements.txt#L8)

## Type of Change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Infrastructure change (CI configs, etc)
- [ ] Non-code change (docs, etc)
- [ ] None of the above: (explain here)

## Test Plan

REST requests should work without a notice in URLLib3 2.0.4+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants