- Specify the API at the beginning of the title (for example, "BigQuery: ...")
General, Core, and Other are also allowed as types
- OS type and version
- Only tested on Linux (Debian), but I assume this happens regardless of OS
- Python version and virtual environment information
python --version
- google-cloud-python version
pip show google-cloud, pip show google-<service> or pip freeze
pip freeze | grep storage gives 1.12.0
- Stacktrace if available
- Steps to reproduce
- Code example
Once the issue mentioned above is resolved and a new version of google-resumable-media-python is released, this library should:
- Require a version of it >= the new version
- Figure out what to do about the
download_to_file() and download_to_filename() methods in blob.py [1] [2]. They currently look like they're supposed to download gzipped objects (those with Content-Encoding set to "gzip") in their compressed state, given that they add the "Accept-Encoding: gzip" header to the request. However, due to the issue mentioned above, they do not; they actually result in the decompressed bytes being written to the desired stream/file. Once this gets fixed and we pull in a new version with that fix, we'll probably want to allow users to specify whether or not the downloaded gzip'd file should be decompressed (this is the behavior today, so it should probably be the default), or if the downloaded file should contain the compressed bytes.
[1]https://github.com/GoogleCloudPlatform/google-cloud-python/blob/e4a24d30283ce42ae58051dfd7f6267f2939d115/storage/google/cloud/storage/blob.py#L542
[2] https://github.com/GoogleCloudPlatform/google-cloud-python/blob/e4a24d30283ce42ae58051dfd7f6267f2939d115/storage/google/cloud/storage/blob.py#L489
General, Core, and Other are also allowed as types
python --versionpip show google-cloud,pip show google-<service>orpip freezepip freeze | grep storagegives 1.12.0_write_to_stream()in theDownloadclass forces decompression of the response even if "Accept-Encoding: gzip" was present in the request google-resumable-media-python#49._write_to_stream()in theDownloadclass forces decompression of the response even if "Accept-Encoding: gzip" was present in the request google-resumable-media-python#49.Once the issue mentioned above is resolved and a new version of google-resumable-media-python is released, this library should:
download_to_file()anddownload_to_filename()methods in blob.py [1] [2]. They currently look like they're supposed to download gzipped objects (those with Content-Encoding set to "gzip") in their compressed state, given that they add the "Accept-Encoding: gzip" header to the request. However, due to the issue mentioned above, they do not; they actually result in the decompressed bytes being written to the desired stream/file. Once this gets fixed and we pull in a new version with that fix, we'll probably want to allow users to specify whether or not the downloaded gzip'd file should be decompressed (this is the behavior today, so it should probably be the default), or if the downloaded file should contain the compressed bytes.[1]https://github.com/GoogleCloudPlatform/google-cloud-python/blob/e4a24d30283ce42ae58051dfd7f6267f2939d115/storage/google/cloud/storage/blob.py#L542
[2] https://github.com/GoogleCloudPlatform/google-cloud-python/blob/e4a24d30283ce42ae58051dfd7f6267f2939d115/storage/google/cloud/storage/blob.py#L489