Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gzip header write OS field #83302

Open
wungad mannequin opened this issue Dec 23, 2019 · 3 comments
Open

gzip header write OS field #83302

wungad mannequin opened this issue Dec 23, 2019 · 3 comments
Labels
3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@wungad
Copy link
Mannequin

wungad mannequin commented Dec 23, 2019

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']

    @wungad
    Copy link
    Mannequin Author

    wungad mannequin commented Dec 23, 2019

    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.

    @wungad wungad mannequin added 3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement and removed 3.9 only security fixes labels Dec 23, 2019
    @SilentGhost SilentGhost mannequin added 3.9 only security fixes labels Dec 23, 2019
    @serhiy-storchaka
    Copy link
    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?

    @wungad
    Copy link
    Mannequin Author

    wungad mannequin commented Dec 23, 2019

    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 <[email protected]>
    wrote:

    Serhiy Storchaka <[email protected]> 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 <[email protected]>
    <https://bugs.python.org/issue39121\>


    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    Status: No status
    Development

    No branches or pull requests

    1 participant