libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pquentin <...@git.apache.org>
Subject [GitHub] libcloud pull request #1133: Fix improper getresponse() uses
Date Mon, 16 Oct 2017 11:51:01 GMT
GitHub user pquentin opened a pull request:

    https://github.com/apache/libcloud/pull/1133

    Fix improper getresponse() uses

    ## Fix improper getresponse() uses
    
    ### Description
    
    During the migration from httplib to requests, a lot of driver code did not change because
they use the high-level libcloud API which hid the change from httplib to requests with the
HttpLibResponseProxy adapter. However, in some cases, driver code needs to access the actual
response, and does this by calling getresponse().
    
    While this used to return an httlib.HTTPResponse instance, this now returns a requests.Response
instance. All code covered by tests was fixed, but OVH and Brightbox common code is not fully
covered. I don't have a subscription to either service and can't test the change, but the
resulting code can only be more correct since it fixes the `getresponse() result comes from
httplib` assumption.
    
    ### Status
    
    - done, ready for review
    
    ### Checklist (tick everything that applies)
    
    - [x] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
(required, can be done after the PR checks)
    - [ ] Documentation
    - [ ] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/pquentin/libcloud getresponse-improper-usage

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/libcloud/pull/1133.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1133
    
----
commit b10395fe21768264c79118155be34d11979de9fa
Author: Quentin Pradet <quentin@clustree.com>
Date:   2017-10-16T10:11:50Z

    Fix improper getresponse() uses
    
    During the migration from httplib to requests, a lot of driver code did
    not change because they use the high-level libcloud API which hid the
    change from httplib to requests with the HttpLibResponseProxy adapter.
    However, in some cases, driver code needs to access the actual response,
    and does this by calling getresponse().
    
    While this used to return an httlib.HTTPResponse instance, this now
    returns a requests.Response instance. All code covered by tests was
    fixed, but OVH and Brightbox common code is not fully covered. I don't
    have a subscription to either service and can't test the change, but the
    resulting code can only be more correct since it fixes the
    `getresponse() result comes from httplib` assumption.

----


---

Mime
View raw message