This repository was archived by the owner on Mar 31, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ class BlobWriter(io.BufferedIOBase):
231231
232232 :type text_mode: bool
233233 :param text_mode:
234- (Deprecated) A synynom for pass_on_flush . For backwards-compatibility,
234+ (Deprecated) A synonym for ignore_flush . For backwards-compatibility,
235235 if True, sets ignore_flush to True. Use ignore_flush instead. This
236236 parameter will be removed in a future release.
237237
@@ -406,15 +406,14 @@ def tell(self):
406406 return self ._buffer .tell () + len (self ._buffer )
407407
408408 def flush (self ):
409- if self ._ignore_flush :
410- # TextIOWrapper expects this method to succeed before calling close().
411- return
412-
413- raise io .UnsupportedOperation (
414- "Cannot flush without finalizing upload. Use close() instead, or "
415- "set ignore_flush=True when constructing this class (see "
416- "docstring)."
417- )
409+ # flush() is not fully supported by the remote service, so raise an
410+ # error here, unless self._ignore_flush is set.
411+ if not self ._ignore_flush :
412+ raise io .UnsupportedOperation (
413+ "Cannot flush without finalizing upload. Use close() instead, "
414+ "or set ignore_flush=True when constructing this class (see "
415+ "docstring)."
416+ )
418417
419418 def close (self ):
420419 self ._checkClosed () # Raises ValueError if closed.
You can’t perform that action at this time.
0 commit comments