-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.
Description
According to the requests changelog the Response class was turned into a context manager only in version 2.18.0. However in google/resumable_media/requests/download.py line 62 (inside _write_to_stream) the code tries to use "response" as a context manager. Some digging reveals that this response makes its way from Client._http which is defined in google/cloud/client.py and gets the Response object from google/auth/transport/requests.py:AuthorizedSession.
So... it definitely feels like something in here needs to require requests >= 2.18.0 (maybe all of them?).
Thoughts?
Detailed info:
- OS type and version: N/A
- Python version and virtual environment information: 2.7 but I don't think it matters.
- google-cloud-python version: google-cloud-storage v 1.3.1
- Stacktrace if available: below.
- Steps to reproduce: Install a version of the requests library less than 2.18.0. Get some blob that exists. Try blob.download_as_string(). I personally re-pro'd this with version 2.10.0 to check. Note that the setup.py only requires 2.0.0 for storage and 2.4.0 for client, etc...
-- PG.
jwanglof
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.