Skip to content

Commit eb2a56d

Browse files
Ubuntuclaude
andcommitted
Fix urllib3 2.6.0+ compatibility in REST client
Replace deprecated getheaders() and getheader() methods with the headers property API that works across urllib3 1.26.x and 2.x. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 02ad98a commit eb2a56d

File tree

1 file changed

+2
-2
lines changed
  • generated/groundlight_openapi_client

1 file changed

+2
-2
lines changed

generated/groundlight_openapi_client/rest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ def __init__(self, resp):
4141

4242
def getheaders(self):
4343
"""Returns a dictionary of the response headers."""
44-
return self.urllib3_response.getheaders()
44+
return self.urllib3_response.headers
4545

4646
def getheader(self, name, default=None):
4747
"""Returns a given response header."""
48-
return self.urllib3_response.getheader(name, default)
48+
return self.urllib3_response.headers.get(name, default)
4949

5050

5151
class RESTClientObject(object):

0 commit comments

Comments
 (0)