@@ -89,6 +89,7 @@ class BlobReader(io.BufferedIOBase):
89
89
configuration changes for Retry objects such as delays and deadlines
90
90
are respected.
91
91
92
+ :type download_kwargs: dict
92
93
:param download_kwargs:
93
94
Keyword arguments to pass to the underlying API calls.
94
95
The following arguments are supported:
@@ -98,9 +99,10 @@ class BlobReader(io.BufferedIOBase):
98
99
- ``if_metageneration_match``
99
100
- ``if_metageneration_not_match``
100
101
- ``timeout``
102
+ - ``raw_download``
101
103
102
- Note that download_kwargs are also applied to blob.reload(), if a reload
103
- is needed during seek().
104
+ Note that download_kwargs (excluding ``raw_download``) are also applied to blob.reload(),
105
+ if a reload is needed during seek().
104
106
"""
105
107
106
108
def __init__ (self , blob , chunk_size = None , retry = DEFAULT_RETRY , ** download_kwargs ):
@@ -175,7 +177,10 @@ def seek(self, pos, whence=0):
175
177
self ._checkClosed () # Raises ValueError if closed.
176
178
177
179
if self ._blob .size is None :
178
- self ._blob .reload (** self ._download_kwargs )
180
+ reload_kwargs = {
181
+ k : v for k , v in self ._download_kwargs .items () if k != "raw_download"
182
+ }
183
+ self ._blob .reload (** reload_kwargs )
179
184
180
185
initial_offset = self ._pos + self ._buffer .tell ()
181
186
@@ -272,6 +277,7 @@ class BlobWriter(io.BufferedIOBase):
272
277
configuration changes for Retry objects such as delays and deadlines
273
278
are respected.
274
279
280
+ :type upload_kwargs: dict
275
281
:param upload_kwargs:
276
282
Keyword arguments to pass to the underlying API
277
283
calls. The following arguments are supported:
0 commit comments