[Patches] [ python-Patches-678531 ] zlib module needs decompress flush.

SourceForge.net noreply at sourceforge.net
Tue Dec 28 20:50:53 CET 2004


Patches item #678531, was opened at 2003-01-31 22:13
Message generated for change (Comment added) made by akuchling
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=678531&group_id=5470

Category: Modules
Group: None
Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Scott David Daniels (scott_daniels)
Assigned to: Nobody/Anonymous (nobody)
Summary: zlib module needs decompress flush.

Initial Comment:
Python 2.3 current (should work on 2,1 and 2.2 as well)
OS: Win2K

The zlibmodule.c sources mistakenly don't implement 
flush() on decompression objects.  The assumption is
that all data will have been extracted once all of the 
source is available.
This patch simply implements flush in the obvious way.
As mentioned in bug #640230, the previous test did not
successfully test the decompression object.

I'll attach in a subsequent patch a PyUnit-style
test_zlib.py 
that exercises zlib and checks the buffer flushing (because
I don't see how to attach two files).

-Scott




----------------------------------------------------------------------

>Comment By: A.M. Kuchling (akuchling)
Date: 2004-12-28 14:50

Message:
Logged In: YES 
user_id=11375

Looking at the code much later, I'm wondering why the
flush() method takes a single integer argument that's used
as the starting size of the output buffer.  This argument
isn't documented and doesn't seem to be invoked by the test
suite (I thought it might be an internal testing feature). 
Scott, was this argument added intentionally?


----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2003-02-03 15:53

Message:
Logged In: YES 
user_id=6380

All checked in. Thanks!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=678531&group_id=5470


More information about the Patches mailing list