Skip to content

gzip header write OS field #83302

Closed as not planned
Closed as not planned

Description

@wungad
mannequin
BPO 39121
Nosy @serhiy-storchaka, @wungad
PRs
  • bpo-39121: write gzip header OS information #17682
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2019-12-23.00:39:47.863>
    labels = ['type-feature', 'library', '3.9']
    title = 'gzip header write OS field'
    updated_at = <Date 2019-12-23.14:51:19.437>
    user = 'https://github.com/wungad'

    bugs.python.org fields:

    activity = <Date 2019-12-23.14:51:19.437>
    actor = 'wungad'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2019-12-23.00:39:47.863>
    creator = 'wungad'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39121
    keywords = ['patch']
    message_count = 3.0
    messages = ['358801', '358805', '358818']
    nosy_count = 2.0
    nosy_names = ['serhiy.storchaka', 'wungad']
    pr_nums = ['17682']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue39121'
    versions = ['Python 3.9']

    Activity

    1. wungad commented on Dec 23, 2019

      wungadmannequin
      MannequinAuthor

      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.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      and removed on Dec 23, 2019
    3. serhiy-storchaka commented on Dec 23, 2019

      @serhiy-storchaka
      Member

      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?

    4. wungad commented on Dec 23, 2019

      wungadmannequin
      MannequinAuthor

      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\>


    5. transferred this issue fromon Apr 10, 2022
    6. StanFromIreland commented on Jun 23, 2025

      @StanFromIreland
      Member

      @serhiy-storchaka Should this issue be closed too, the PR was closed with:

      Sorry, but I do not think we need this feature. There is no any use case. This PR just makes the code more complex without necessity.

      So I assume so?

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

      Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions