pinecone-io / pinecone-python-client

The Pinecone Python client
https://www.pinecone.io/docs
Apache License 2.0
284 stars 78 forks source link

DeprecationWarning: HTTPResponse.getheader() is deprecated #125

Closed alexerhardt closed 4 months ago

alexerhardt commented 1 year ago

I constantly get the following error message:

/path-to-environment/lib/python3.8/site-packages/pinecone/core/client/rest.py:45: DeprecationWarning: HTTPResponse.getheader() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTResponse.headers.get(name, default).

I can see in the source code the following:

class RESTResponse(io.IOBase):
    # ...
    def getheader(self, name, default=None):
        """Returns a given response header."""
        return self.urllib3_response.getheader(name, default)

The warnings are very frequent, and the fix at first glance seems rather easy.

Lib Version 2.1.0

OS/Hardware Mac OS Monterey 12.0.1 / Apple M1 Macbook Pro

gdj0nes commented 1 year ago

Thanks for calling this to our attention! We'll get this added to an upcoming release.

liorgreenbergmh commented 1 year ago

This issue still happens in 2.2.2

daverigby commented 4 months ago

This was fixed in v2.2.3 via: https://github.com/pinecone-io/pinecone-python-client/commit/f6bda12e59a7a034f11b5b487a957c4effaddd6a