Repository: googleapis/python-storage

Issue:
`download_chunks_concurrently` spams the log with INFO messages about checksum not being returned
#### Environment details

  - OS type and version: MacOS 14.7
  - Python version: 3.10.15
  - pip version: 24.2
  - `google-cloud-storage` version: 2.18.2

#### Steps to reproduce

  1. Use `transfer_manager.download_chunks_concurrently` API to download a large file from GCS
  2. A lot of INFO log messages should appear (for ~1GB file I get 30+):

```
INFO google.resumable_media._helpers - No MD5 checksum was returned from the service while downloading ...
(which happens for composite objects), so client-side content integrity checking is not being performed.
```

#### Code example

```python
url = "gs://..." # large object
client = storage.Client(
    credentials=credentials,
    project=project,
)
blob = Blob.from_string(url, client=client)
transfer_manager.download_chunks_concurrently(
    blob,
    filename,
)
```

I'm going to prepare a PR fixing this.

Discussion:
conventional-commit-lint-gcf[bot]: <!-- probot comment [1356997]-->
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use `automerge` label. Good luck human!

 -- conventional-commit-lint bot
https://conventionalcommits.org/
andrewsg: This makes sense to me. Thank you for your submission!

Patch:
diff --git a/google/cloud/storage/transfer_manager.py b/google/cloud/storage/transfer_manager.py
index 1b48cd9..15325df 100644
--- a/google/cloud/storage/transfer_manager.py
+++ b/google/cloud/storage/transfer_manager.py
@@ -885,6 +885,8 @@ def download_chunks_concurrently(
             "'checksum' is in download_kwargs, but is not supported because sliced downloads have a different checksum mechanism from regular downloads. Use the 'crc32c_checksum' argument on download_chunks_concurrently instead."
         )
 
+    download_kwargs = download_kwargs.copy()
+    download_kwargs["checksum"] = None
     download_kwargs["command"] = "tm.download_sharded"
 
     # We must know the size and the generation of the blob.


Test patch:
diff --git a/tests/unit/test_transfer_manager.py b/tests/unit/test_transfer_manager.py
index cee83ba..09969b5 100644
--- a/tests/unit/test_transfer_manager.py
+++ b/tests/unit/test_transfer_manager.py
@@ -606,6 +606,7 @@ def test_download_chunks_concurrently():
 
     expected_download_kwargs = EXPECTED_DOWNLOAD_KWARGS.copy()
     expected_download_kwargs["command"] = "tm.download_sharded"
+    expected_download_kwargs["checksum"] = None
 
     with mock.patch("google.cloud.storage.transfer_manager.open", mock.mock_open()):
         result = transfer_manager.download_chunks_concurrently(
@@ -636,9 +637,6 @@ def test_download_chunks_concurrently_with_crc32c():
     blob_mock.size = len(BLOB_CONTENTS)
     blob_mock.crc32c = "eOVVVw=="
 
-    expected_download_kwargs = EXPECTED_DOWNLOAD_KWARGS.copy()
-    expected_download_kwargs["command"] = "tm.download_sharded"
-
     def write_to_file(f, *args, **kwargs):
         f.write(BLOB_CHUNK)
 
@@ -664,9 +662,6 @@ def test_download_chunks_concurrently_with_crc32c_failure():
     blob_mock.size = len(BLOB_CONTENTS)
     blob_mock.crc32c = "invalid"
 
-    expected_download_kwargs = EXPECTED_DOWNLOAD_KWARGS.copy()
-    expected_download_kwargs["command"] = "tm.download_sharded"
-
     def write_to_file(f, *args, **kwargs):
         f.write(BLOB_CHUNK)