Skip to content

Fix urllib3 2.6.0+ compatibility in REST client#404

Draft
f-wright wants to merge 1 commit intomainfrom
vk/c159-broken-dependenc
Draft

Fix urllib3 2.6.0+ compatibility in REST client#404
f-wright wants to merge 1 commit intomainfrom
vk/c159-broken-dependenc

Conversation

@f-wright
Copy link
Contributor

@f-wright f-wright commented Feb 5, 2026

Summary

  • Replace deprecated getheaders() and getheader() methods with the headers property API in the REST client

Why

urllib3 2.6.0 removed the deprecated HTTPResponse.getheader() and HTTPResponse.getheaders() methods. Since our pyproject.toml specifies urllib3 = "^2.5.0", users who install with urllib3 2.6.0+ encounter:

AttributeError: 'HTTPResponse' object has no attribute 'getheader'

Implementation Details

Changed generated/groundlight_openapi_client/rest.py:

# Before (broken in urllib3 2.6.0+)
return self.urllib3_response.getheaders()
return self.urllib3_response.getheader(name, default)

# After (works in urllib3 1.26.x and 2.x)
return self.urllib3_response.headers
return self.urllib3_response.headers.get(name, default)

The new API using .headers and .headers.get() is backwards-compatible with both urllib3 1.26.x and 2.x.

Note

Since rest.py is auto-generated by OpenAPI Generator, consider applying a post-generation patch or updating to a newer generator version that produces urllib3 2.6+ compatible code.

🤖 Generated with Claude Code

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>
@f-wright f-wright changed the title Broken dependency (vibe-kanban) Fix urllib3 2.6.0+ compatibility in REST client Feb 5, 2026
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.

1 participant