[issue5784] raw deflate format and zlib module

2016-05-27 Thread Martin Panter
Martin Panter added the comment: > v = tuple(map(int, zlib.ZLIB_RUNTIME_VERSION.split("."))) > supports_wbits_0 = v >= (1, 2, 3, 5) That was basically my first thought. But I didn’t want to presume that every element of the version is an integer. For instance, the current string in the

[issue5784] raw deflate format and zlib module

2016-05-27 Thread STINNER Victor
STINNER Victor added the comment: I agree Serhiy :-) i hesitated to propose exactly the same change. -- ___ Python tracker ___

[issue5784] raw deflate format and zlib module

2016-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would write the test as: v = tuple(map(int, zlib.ZLIB_RUNTIME_VERSION.split("."))) supports_wbits_0 = v >= (1, 2, 3, 5) -- nosy: +serhiy.storchaka ___ Python tracker

[issue5784] raw deflate format and zlib module

2016-05-27 Thread STINNER Victor
STINNER Victor added the comment: > In Python 2 I removed the test, because Python 2 has no > zlib.ZLIB_RUNTIME_VERSION to check. It makes sense. You didn't touch the C code of the module, only doc. -- ___ Python tracker

[issue5784] raw deflate format and zlib module

2016-05-27 Thread Martin Panter
Martin Panter added the comment: Apparently zlib only supports windowBits (wbits) = 0 since v1.2.3.5. I added a version check in the Python 3 tests, which seems to have solved the buildbot problems (OpenIndiana and OS X buildbots). In Python 2 I removed the test, because Python 2 has no

[issue5784] raw deflate format and zlib module

2016-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0df93ab07a8f by Martin Panter in branch '2.7': Issue #5784: Cannot test wbits=0 unless we know we have zlib v1.2.3.5 https://hg.python.org/cpython/rev/0df93ab07a8f -- ___ Python tracker

[issue5784] raw deflate format and zlib module

2016-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset ca49614989dd by Martin Panter in branch '3.5': Issue #5784: wbits=0 apparently added in zlib v1.2.3.5 https://hg.python.org/cpython/rev/ca49614989dd New changeset 1771f0ac9fc2 by Martin Panter in branch 'default': Issue #5784: Merge zlib from 3.5

[issue5784] raw deflate format and zlib module

2016-05-27 Thread STINNER Victor
STINNER Victor added the comment: Failure on Python 2.7: http://buildbot.python.org/all/builders/x86%20OpenIndiana%202.7/builds/3348/steps/test/logs/stdio == ERROR: test_wbits (test.test_zlib.CompressObjectTestCase)

[issue5784] raw deflate format and zlib module

2016-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4c88d6d18e85 by Martin Panter in branch '3.5': Issue #5784: Expand documentation and tests for zlib wbits parameter https://hg.python.org/cpython/rev/4c88d6d18e85 New changeset 4d4f27fc70d5 by Martin Panter in branch 'default': Issue #5784: Merge

[issue5784] raw deflate format and zlib module

2016-05-27 Thread Martin Panter
Changes by Martin Panter : -- stage: patch review -> commit review versions: -Python 3.4 ___ Python tracker ___

[issue5784] raw deflate format and zlib module

2015-11-28 Thread Martin Panter
Martin Panter added the comment: Here is a patch with the following changes: * Clarified that wbits affects the container format as well as windows size * Undid some word wrapping to make the diff simpler * Added zero and 32 + n for decompression * Added full list of options under

[issue5784] raw deflate format and zlib module

2015-11-17 Thread Martin Panter
Martin Panter added the comment: Looking at the current zlib module source code, I confirmed that wbits is passed directly to the deflateInit2(windowBits) and inflateInit2(windowBits) parameters. So the following modes could also be added to the documentation for decompression: * Zero:

[issue5784] raw deflate format and zlib module

2015-04-26 Thread paul rubin
paul rubin added the comment: Hey, thanks for updating this. I still remember the nasty incident that got me filing this report in the first place. I'll look at the patch more closely when I get a chance, but the immediate comment I'd make is it's worth adding a sentence saying explicitly

[issue5784] raw deflate format and zlib module

2015-04-18 Thread A.M. Kuchling
A.M. Kuchling added the comment: Here's a short patch that expands the discussion of wbits, and duplicates it under both the compressobj() and decompress() methods. Should I avoid the duplication and just have a reference? -- nosy: +akuchling Added file:

[issue5784] raw deflate format and zlib module

2015-04-18 Thread Martin Panter
Martin Panter added the comment: Looks good in general (apart from one grammar comment). It might be best to only include one copy, and reference the others. There are actually three places “wbits” is allowed that I can see: * compressobj() * decompress() * decompressobj() Maybe just

[issue5784] raw deflate format and zlib module

2015-04-18 Thread A.M. Kuchling
Changes by A.M. Kuchling a...@amk.ca: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5784 ___ ___

[issue5784] raw deflate format and zlib module

2015-04-18 Thread A.M. Kuchling
A.M. Kuchling added the comment: Thanks! Here's an updated version with some more rewriting -- the list is now in only one place and is linked-to from the decompression documentation. -- Added file: http://bugs.python.org/file39105/patch-5784.txt

[issue5784] raw deflate format and zlib module

2015-03-22 Thread Martin Panter
Martin Panter added the comment: According to http://zlib.net/manual.html#Advanced, the deflateInit2(windowBits) parameter can be: * +8 to +15 to include a “zlib” header and trailer * −8 to −15 to write a raw Deflate stream with no header nor trailer * 16 + (8 to 15) to include a basic “gzip”

[issue5784] raw deflate format and zlib module

2012-11-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - needs patch versions: +Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5784 ___

[issue5784] raw deflate format and zlib module

2012-01-26 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5784 ___ ___ Python-bugs-list

[issue5784] raw deflate format and zlib module

2011-03-08 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5784 ___ ___ Python-bugs-list

[issue5784] raw deflate format and zlib module

2010-08-07 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5784 ___ ___ Python-bugs-list

[issue5784] raw deflate format and zlib module

2010-07-08 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: A doc addition would seem like a good idea, so I am changing this to a doc issue for the current versions. Can you suggest specific text and a specific location to place it? A behavior change could only go into 3.2. I do not know who, if

[issue5784] raw deflate format and zlib module

2009-04-17 Thread paul rubin
New submission from paul rubin p...@users.sourceforge.net: The zlib module doesn't support raw deflate format, so it doesn't completely interoperate with php's gzdeflate function and fails to decompress some strings that web browsers can decompress. A workaround is to use a special zlib feature

[issue5784] raw deflate format and zlib module

2009-04-17 Thread paul rubin
Changes by paul rubin p...@users.sourceforge.net: -- components: +Library (Lib) type: - feature request versions: +Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5784 ___

[issue5784] raw deflate format and zlib module

2009-04-17 Thread paul rubin
paul rubin p...@users.sourceforge.net added the comment: I should have mentioned, the docs do say When wbits is negative, the standard gzip header is suppressed; this is an undocumented feature of the zlib library, used for compatibility with unzip‘s compression file format but this wasn't