@@ -89,6 +89,7 @@ class BlobReader(io.BufferedIOBase):
8989 configuration changes for Retry objects such as delays and deadlines
9090 are respected.
9191
92+ :type download_kwargs: dict
9293 :param download_kwargs:
9394 Keyword arguments to pass to the underlying API calls.
9495 The following arguments are supported:
@@ -98,9 +99,10 @@ class BlobReader(io.BufferedIOBase):
9899 - ``if_metageneration_match``
99100 - ``if_metageneration_not_match``
100101 - ``timeout``
102+ - ``raw_download``
101103
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().
104106 """
105107
106108 def __init__ (self , blob , chunk_size = None , retry = DEFAULT_RETRY , ** download_kwargs ):
@@ -175,7 +177,10 @@ def seek(self, pos, whence=0):
175177 self ._checkClosed () # Raises ValueError if closed.
176178
177179 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 )
179184
180185 initial_offset = self ._pos + self ._buffer .tell ()
181186
@@ -272,6 +277,7 @@ class BlobWriter(io.BufferedIOBase):
272277 configuration changes for Retry objects such as delays and deadlines
273278 are respected.
274279
280+ :type upload_kwargs: dict
275281 :param upload_kwargs:
276282 Keyword arguments to pass to the underlying API
277283 calls. The following arguments are supported:
0 commit comments