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

tarfile: Default value for compresslevel is not documented #69682

Closed
Sworddragon mannequin opened this issue Oct 28, 2015 · 7 comments
Closed

tarfile: Default value for compresslevel is not documented #69682

Sworddragon mannequin opened this issue Oct 28, 2015 · 7 comments
Labels
docs Documentation in the Doc dir easy stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@Sworddragon
Copy link
Mannequin

Sworddragon mannequin commented Oct 28, 2015

BPO 25496
Nosy @berkerpeksag, @vadmium, @matrixise
Files
  • Issue25496.v1.patch
  • 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 = <Date 2016-04-13.06:05:49.975>
    created_at = <Date 2015-10-28.08:39:27.004>
    labels = ['easy', 'type-feature', 'library', 'docs']
    title = 'tarfile: Default value for compresslevel is not documented'
    updated_at = <Date 2016-04-13.06:05:49.974>
    user = 'https://bugs.python.org/Sworddragon'

    bugs.python.org fields:

    activity = <Date 2016-04-13.06:05:49.974>
    actor = 'martin.panter'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2016-04-13.06:05:49.975>
    closer = 'martin.panter'
    components = ['Documentation', 'Library (Lib)']
    creation = <Date 2015-10-28.08:39:27.004>
    creator = 'Sworddragon'
    dependencies = []
    files = ['41499']
    hgrepos = []
    issue_num = 25496
    keywords = ['patch', 'easy']
    message_count = 7.0
    messages = ['253592', '253624', '253655', '257482', '259988', '263306', '263310']
    nosy_count = 7.0
    nosy_names = ['docs@python', 'Sworddragon', 'python-dev', 'berker.peksag', 'martin.panter', 'matrixise', 'hamzatkhan94']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue25496'
    versions = ['Python 2.7', 'Python 3.5', 'Python 3.6']

    @Sworddragon
    Copy link
    Mannequin Author

    Sworddragon mannequin commented Oct 28, 2015

    After ticket bpo-21404 got solved I'm noticing that the default value for the compresslevel argument is not mentioned. Maybe this can be documented too.

    @Sworddragon Sworddragon mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Oct 28, 2015
    @berkerpeksag berkerpeksag added easy docs Documentation in the Doc dir labels Oct 28, 2015
    @matrixise
    Copy link
    Member

    Hi Sworddragon,

    Where compresslevel is not mentioned in the doc ?

    Thank you

    @Sworddragon
    Copy link
    Mannequin Author

    Sworddragon mannequin commented Oct 29, 2015

    At tarfile, but the compresslevel argument is mentioned there but not its default value.

    @Sworddragon Sworddragon mannequin changed the title Default value for compresslevel is not documented tarfile: Default value for compresslevel is not documented Oct 29, 2015
    @hamzatkhan94
    Copy link
    Mannequin

    hamzatkhan94 mannequin commented Jan 4, 2016

    Here is trivial fix for this issue. This is my first patch and I hope that it gets accepted and integrated.

    hamza@hamza-ub94:/git/cpython$ grep compresslevel Lib/tarfile.py
    def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9, **kwargs):
    fileobj = gzip.GzipFile(name, mode + "b", compresslevel, fileobj)
    def bz2open(cls, name, mode="r", fileobj=None, compresslevel=9, **kwargs):
    compresslevel=compresslevel)
    hamza@hamza-ub94:
    /git/cpython$

    @vadmium
    Copy link
    Member

    vadmium commented Feb 10, 2016

    For gzip compression, there is also a proposal to change the default: bpo-26253.

    Anyway, the patch looks good for now.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Apr 13, 2016

    New changeset b1f3fe320adf by Martin Panter in branch '3.5':
    Issue bpo-25496: Document compresslevel defaults to 9, by Hamza T Khan
    https://hg.python.org/cpython/rev/b1f3fe320adf

    New changeset a04455866ec7 by Martin Panter in branch 'default':
    Issue bpo-25496: Merge tarfile doc from 3.5
    https://hg.python.org/cpython/rev/a04455866ec7

    New changeset 4b9d70d3ba1b by Martin Panter in branch '2.7':
    Issue bpo-25496: Document compresslevel defaults to 9, by Hamza T Khan
    https://hg.python.org/cpython/rev/4b9d70d3ba1b

    @vadmium
    Copy link
    Member

    vadmium commented Apr 13, 2016

    Thanks for the patch Hamza

    @vadmium vadmium closed this as completed Apr 13, 2016
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir easy stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants