Skip to content

zlib.compressobj level default value documentation #70432

Closed

Description

@palaviv
mannequin
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']

    Activity

    1. palaviv commented on Jan 30, 2016

      palavivmannequin
      MannequinAuthor

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

      patch is included

    2. vadmium commented on Jan 30, 2016

      @vadmium
      Member

      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.

    3. palaviv commented on Jan 31, 2016

      palavivmannequin
      MannequinAuthor

      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.

    4. vadmium commented on Jan 31, 2016

      @vadmium
      Member

      This version looks great to me.

    5. python-dev commented on Feb 2, 2016

      python-devmannequin
      Mannequin

      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

    6. vadmium commented on Feb 2, 2016

      @vadmium
      Member

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

    7. transferred this issue fromon Apr 10, 2022
    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

      docsDocumentation in the Doc dirextension-modulesC modules in the Modules dir

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions