mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Patch #1110248: SYNC_FLUSH the zlib buffer for GZipFile.flush.
Partially fixes #1110242.
This commit is contained in:
parent
df24153f65
commit
f2a8d63e4f
2 changed files with 6 additions and 1 deletions
|
@ -331,7 +331,10 @@ class GzipFile:
|
|||
return
|
||||
self.close()
|
||||
|
||||
def flush(self):
|
||||
def flush(self,zlib_mode=zlib.Z_SYNC_FLUSH):
|
||||
if self.mode == WRITE:
|
||||
# Ensure the compressor's buffer is flushed
|
||||
self.fileobj.write(self.compress.flush(zlib_mode))
|
||||
self.fileobj.flush()
|
||||
|
||||
def fileno(self):
|
||||
|
|
|
@ -59,6 +59,8 @@ Extension Modules
|
|||
Library
|
||||
-------
|
||||
|
||||
- Patch #1110248: SYNC_FLUSH the zlib buffer for GZipFile.flush.
|
||||
|
||||
- Patch #1107973: Allow to iterate over the lines of a tarfile.ExFileObject.
|
||||
|
||||
- Patch #1104111: Alter setup.py --help and --help-commands.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue