Commit f2a8d63e authored by Martin v. Löwis's avatar Martin v. Löwis

Patch #1110248: SYNC_FLUSH the zlib buffer for GZipFile.flush.

Partially fixes #1110242.
parent df24153f
...@@ -331,7 +331,10 @@ class GzipFile: ...@@ -331,7 +331,10 @@ class GzipFile:
return return
self.close() 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() self.fileobj.flush()
def fileno(self): def fileno(self):
......
...@@ -59,6 +59,8 @@ Extension Modules ...@@ -59,6 +59,8 @@ Extension Modules
Library Library
------- -------
- Patch #1110248: SYNC_FLUSH the zlib buffer for GZipFile.flush.
- Patch #1107973: Allow to iterate over the lines of a tarfile.ExFileObject. - Patch #1107973: Allow to iterate over the lines of a tarfile.ExFileObject.
- Patch #1104111: Alter setup.py --help and --help-commands. - Patch #1104111: Alter setup.py --help and --help-commands.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment