Skip to content

Client fails with urllib3>=2.6.0 (AttributeError: 'HTTPResponse' object has no attribute 'getheader') #11

@nolmac

Description

@nolmac

urllib3 version 2.6.0 removed the deprecated getheader() method.

Removed the HTTPResponse.getheaders() method in favor of HTTPResponse.headers. Removed the HTTPResponse.getheader(name, default) method in favor of HTTPResponse.headers.get(name, default).

Steps to Reproduce

  • Install the generated python client.
  • Update environment to urllib3>=2.6.0.
  • Call an API method that processes response headers (e.g., create_upload_and_import_course_job).

Solution

  • We need to update instances of HTTPResponse.getheaders() with HTTPResponse.headers.get() or pin urllib3 to <2.6.0 (though there are some security updates in 2.6.0 that we may want)

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