-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google cloud storage needs requests >= 2.18.0 but the setup.py only requires >= 2.4.0 #3747
Comments
Aha, thanks for reporting @newt0311. I had a theory that this might have been the root cause of #3736 as I said there this morning (although the subsequent |
@jonparrott @dhermes Any issue with bumping our minimum bound to 2.18.0? |
|
I have no issues with bumping the minimum bound. |
@lukesneeringer Yes, thank you. It could be related to my issue #3736. I re-checked and the fact is that I used requests 2.12.3 (I forced it in my requirements.txt) which is required (> 2.0.0) by google-cloud 0.27.0 |
@sonlac That would certainly explain the lack of |
Oh yeah: that -- PG. Update: I only noticed this because I was running things on google-cloud-dataflow. I suspect people's local setups tend to be fairly up-to-date so bugs like this get masked... |
@sonlac Yeah, the older version of requests was almost definitely your problem. I am super glad now that I wrote fauxquests back in the day, because I recognized the error immediately (which is why I asked you about it). |
Yep. pip by default will do the newest it can, so it would only appear for people with an older version already installed in their virtualenv. |
Not always true. Sometimes, people fix google-cloud to a specific version in requirements.txt. So, pip tried to install the latest packages it can. For my case, I fixed google-cloud to 0.24.0 but pip installed google-cloud-storage 1.3.0 for all versions older than google-cloud 0.27.0. The fact that the google-cloud-storage 1.3.0 only works with google-cloud-core 0.26.0 (google cloud 0.27.0) https://github.com/GoogleCloudPlatform/google-cloud-python/releases/tag/storage-1.3.0. It's is something about "user-aware", so just be careful. |
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:
-- PG.
The text was updated successfully, but these errors were encountered: