Skip to content

Commit 9dcc684

Browse files
authored
feat: Add "transfer_manager" module for concurrent uploads and downloads as a preview feature (#844)
* checkpoint before design doc impl * checkpoint * more tests * code and tests for transfer manager complete * proactively close temp files when finished reading * respond to comments; destroy tmp files as they are consumed * Add system tests, docstrings, address feedback * Respond to review comments * verify md5 hash of downloaded file in test * lint * default empty strings for root arguments * fix bug with blob constructor * add warning about files not being deleted if their downloads fail
1 parent 1c5408d commit 9dcc684

File tree

5 files changed

+1007
-2
lines changed

5 files changed

+1007
-2
lines changed

google/cloud/storage/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
1415
"""Constants used across google.cloud.storage modules."""
1516

1617
# Storage classes

google/cloud/storage/fileio.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""Support for file-like I/O."""
15+
"""Module for file-like access of blobs, usually invoked via Blob.open()."""
1616

1717
import io
1818
import warnings
@@ -101,10 +101,12 @@ class BlobReader(io.BufferedIOBase):
101101
- ``if_metageneration_match``
102102
- ``if_metageneration_not_match``
103103
- ``timeout``
104+
105+
Note that download_kwargs are also applied to blob.reload(), if a reload
106+
is needed during seek().
104107
"""
105108

106109
def __init__(self, blob, chunk_size=None, retry=DEFAULT_RETRY, **download_kwargs):
107-
"""docstring note that download_kwargs also used for reload()"""
108110
for kwarg in download_kwargs:
109111
if kwarg not in VALID_DOWNLOAD_KWARGS:
110112
raise ValueError(

0 commit comments

Comments
 (0)