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

zlib.compressobj level default value documentation #70432

Closed
palaviv mannequin opened this issue Jan 30, 2016 · 6 comments
Closed

zlib.compressobj level default value documentation #70432

palaviv mannequin opened this issue Jan 30, 2016 · 6 comments
Labels
docs Documentation in the Doc dir extension-modules C modules in the Modules dir

Comments

@palaviv
Copy link
Mannequin

palaviv mannequin commented Jan 30, 2016

BPO 26244
Nosy @Yhg1s, @vadmium, @palaviv
Files
  • zlib-compressobj-level-doc.patch
  • zlib-compressobj-level-doc2.patch: patch after martin review
  • 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-02-02.09:57:19.116>
    created_at = <Date 2016-01-30.18:48:48.845>
    labels = ['extension-modules', 'docs']
    title = 'zlib.compressobj level default value documentation'
    updated_at = <Date 2016-02-02.09:57:19.114>
    user = 'https://github.com/palaviv'

    bugs.python.org fields:

    activity = <Date 2016-02-02.09:57:19.114>
    actor = 'martin.panter'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2016-02-02.09:57:19.116>
    closer = 'martin.panter'
    components = ['Documentation', 'Extension Modules']
    creation = <Date 2016-01-30.18:48:48.845>
    creator = 'palaviv'
    dependencies = []
    files = ['41761', '41766']
    hgrepos = []
    issue_num = 26244
    keywords = ['patch']
    message_count = 6.0
    messages = ['259267', '259269', '259289', '259302', '259367', '259373']
    nosy_count = 6.0
    nosy_names = ['twouters', 'nadeem.vawda', 'docs@python', 'python-dev', 'martin.panter', 'palaviv']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue26244'
    versions = ['Python 2.7', 'Python 3.5', 'Python 3.6']

    @palaviv
    Copy link
    Mannequin Author

    palaviv mannequin commented Jan 30, 2016

    In the zlib.compressobj documentation the default value of the compress level is -1 while it is actually 6.

    patch is included

    @palaviv palaviv mannequin assigned docspython Jan 30, 2016
    @palaviv palaviv mannequin added docs Documentation in the Doc dir extension-modules C modules in the Modules dir labels Jan 30, 2016
    @vadmium
    Copy link
    Member

    vadmium commented Jan 30, 2016

    I’m not sure that is perfectly correct. It really does default to -1, and that is passed to the underlying zlib library (-1 = Z_DEFAULT_COMPRESSION). It is the zlib library that decides that this means 6, but in theory I guess it could be configured or modified in the future with a different default. Perhaps we should clarify the text in the documentation (including the doc string) to say this instead?

    At the very least, the documentation should continue to say that -1 is acceptable, and what it means.

    @palaviv
    Copy link
    Mannequin Author

    palaviv mannequin commented Jan 31, 2016

    I think that we can leave the level=-1 as the default in the documentation. What should be added is what Z_DEFAULT_COMPRESSION means.
    I tried to be as close as possible to the zlib module documentation.

    @vadmium
    Copy link
    Member

    vadmium commented Jan 31, 2016

    This version looks great to me.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Feb 2, 2016

    New changeset 650cf38fba28 by Martin Panter in branch '2.7':
    Issue bpo-26244: Clarify default zlib compression level in documentation
    https://hg.python.org/cpython/rev/650cf38fba28

    New changeset 950e0bfe94ae by Martin Panter in branch '3.5':
    Issue bpo-26244: Clarify default zlib compression level in documentation
    https://hg.python.org/cpython/rev/950e0bfe94ae

    New changeset 03708c680eca by Martin Panter in branch 'default':
    Issue bpo-26244: Merge zlib documentation from 3.5
    https://hg.python.org/cpython/rev/03708c680eca

    @vadmium
    Copy link
    Member

    vadmium commented Feb 2, 2016

    I also made a small change to the compressobj() doc string.

    @vadmium vadmium closed this as completed Feb 2, 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 extension-modules C modules in the Modules dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant