Skip to content

DeprecationWarning: HTTPResponse.getheader() is deprecated #125

@alexerhardt

Description

@alexerhardt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions