Issue1110248
Created on 2005-01-26 21:57 by dschnepper, last changed 2005-03-03 08:38 by loewis.
| File name |
Uploaded |
Description |
Edit |
Remove |
|
diff.out
|
dschnepper,
2005-01-26 21:57
|
patch for gzip.GzipFile.flush |
|
|
|
msg47627 - (view) |
Author: David Schnepper (dschnepper) |
Date: 2005-01-26 21:57 |
|
Ensure the compress buffer is flushed prior to the
file buffer being flushed when gzip.GzipFile.flush()
is invoked.
Patch for bug 1110242
|
|
msg47628 - (view) |
Author: Alan McIntyre (alanmcintyre) |
Date: 2005-02-27 04:36 |
|
Logged In: YES
user_id=1115903
This patch appears to fix the bug as described, and running
the regression tests on Python 2.5a0 (CVS HEAD) turns up no
problems. Since the documentation says that a GzipFile
"simulates most of the methods of a file object," I would
expect GzipFile.flush() to act in the way that David
described in the first paragraph of the bug report, and his
patch seems to provide that as far as I can tell.
Note: I only ran tests on Python 2.5a0 built with MSVC .NET
on Windows XP.
|
|
msg47629 - (view) |
Author: Martin v. Löwis (loewis) |
Date: 2005-03-03 08:38 |
|
Logged In: YES
user_id=21627
Thanks for the patch. I believe it does not fully fix the
bug reported: not all input data are flushed with
Z_SYNC_FLUSH, but only some (up to an output byte boundary
or some such). I also believe that a "complete" fix for the
bug is not possible, as flushing all input data would
require Z_FINISH, and then no more additional data could be
written into the stream.
As this is still an improvement over the current status, I
committed it as
gzip.py 1.43
NEWS 1.1251
|
|
| Date |
User |
Action |
Args |
| 2005-01-26 21:57:40 | dschnepper | create | |
|