[issue27521] Misleading compress level header on files created with gzip

2016-07-15 Thread Dor Dankner
New submission from Dor Dankner: When creating a gzip file using the gzip module, the wrong header is set as the compress level when not using the default (9). the reason is that the header is set blindly as \002, without really checking what compress level is. Patch to fix that behaviour is

[issue27521] Misleading compress level header on files created with gzip

2016-07-15 Thread Dor Dankner
Dor Dankner added the comment: Thank you for the fast reponse! tests patch for the proposal fix is attached :) -- Added file: http://bugs.python.org/file43734/compress_level_tests.patch ___ Python tracker <http://bugs.python.org/issue27

[issue27525] Wrong OS header on file created by gzip module

2016-07-15 Thread Dor Dankner
New submission from Dor Dankner: The gzip module generates files with wrong OS header, by putting "Unknown" OS, instead of checking and filling the user's OS. >From the gzip RFC (rfc1952): "This identifies the type of file system on which >compression took pl

[issue27525] Wrong OS header on file created by gzip module

2016-07-16 Thread Dor Dankner
Dor Dankner added the comment: It does not seem like a feature after you see this issue #27521. The OS was just hardcoded, the same way the compression level was hardcoded. you may say it's a feature too :P The way I see it, the gzip module should at least work like the original GNU gzi

[issue27525] Wrong OS header on file created by gzip module

2016-07-16 Thread Dor Dankner
Dor Dankner added the comment: I'm convinced. Thank you all for your comments :) -- status: open -> closed ___ Python tracker <http://bugs.python.org