This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: gzip header write OS field
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka, wungad
Priority: normal Keywords: patch

Created on 2019-12-23 00:39 by wungad, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 17682 closed wungad, 2019-12-23 00:49
Messages (3)
msg358801 - (view) Author: Rob Man (wungad) * Date: 2019-12-23 00:39
Files written with gzip module write a value of 255 (unknown) at the 10th position in the header which defined what OS was used when gzip file was written. 
Files written with gzip linux command correctly set that field to the value of 3 (Unix).
This ehancement does that.
msg358805 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-12-23 08:04
The OS field is used in determining end-of-line convention for text files. But since we do not set the FTEXT flag, all files are binary. RFC 1952

Why do you need to set this field?
msg358818 - (view) Author: Rob Man (wungad) * Date: 2019-12-23 14:51
I do not need it for personaly, but since RFC exists and since linux
command line equivalent writes OS information, why should python gzip
implementation not include that.
The same goes for the FCOMMENT field for wich I also have a patch ready and
I they're both nice enhancements.

On Mon, 23 Dec 2019 at 09:04, Serhiy Storchaka <report@bugs.python.org>
wrote:

>
> Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment:
>
> The OS field is used in determining end-of-line convention for text files.
> But since we do not set the FTEXT flag, all files are binary. RFC 1952
>
> Why do you need to set this field?
>
> ----------
> nosy: +serhiy.storchaka
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue39121>
> _______________________________________
>
History
Date User Action Args
2022-04-11 14:59:24adminsetgithub: 83302
2019-12-23 14:51:19wungadsetmessages: + msg358818
2019-12-23 08:04:50serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg358805
2019-12-23 07:23:11SilentGhostsetversions: + Python 3.9
2019-12-23 02:52:19wungadsetversions: - Python 3.9
2019-12-23 00:49:48wungadsetkeywords: + patch
stage: patch review
pull_requests: + pull_request17138
2019-12-23 00:39:47wungadcreate