zlib.rst: Link to constants and deduplicate text#140115
zlib.rst: Link to constants and deduplicate text#140115emmatyping merged 2 commits intopython:mainfrom
zlib.rst: Link to constants and deduplicate text#140115Conversation
| .. versionadded:: next | ||
|
|
||
| .. function:: compress(data, /, level=-1, wbits=MAX_WBITS) | ||
| .. function:: compress(data, /, level=Z_DEFAULT_COMPRESSION, wbits=MAX_WBITS) |
There was a problem hiding this comment.
Per the clinic, this is what it defaults to. Ditto below.
| *strategy* is used to tune the compression algorithm. Possible values are | ||
| :const:`Z_DEFAULT_STRATEGY`, :const:`Z_FILTERED`, :const:`Z_HUFFMAN_ONLY`, | ||
| :const:`Z_RLE` (zlib 1.2.0.1) and :const:`Z_FIXED` (zlib 1.2.2.2). | ||
| :const:`Z_RLE` and :const:`Z_FIXED`. |
There was a problem hiding this comment.
I think there is no need to reference version here, the information is now provided in the doc of the constant.
There was a problem hiding this comment.
Agreed, it seems we set a minimum version so it's fine to assume these are here, and users shouldn't run into ancient versions like these anyway
emmatyping
left a comment
There was a problem hiding this comment.
Thanks! I think this looks good.
|
Thanks @StanFromIreland for the PR, and @emmatyping for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
|
Sorry, @StanFromIreland and @emmatyping, I could not cleanly backport this to |
|
Sorry, @StanFromIreland and @emmatyping, I could not cleanly backport this to |
|
GH-140349 is a backport of this pull request to the 3.14 branch. |
|
GH-140350 is a backport of this pull request to the 3.13 branch. |
|
Thanks for backporting! |
…GH-140349) * Link to compression setting constants from compression functions * De-duplicate descriptions of the constants (cherry picked from commit 091e851) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
…GH-140350) * Link to compression setting constants from compression functions * De-duplicate descriptions of the constants (cherry picked from commit 091e851) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* Link to compression setting constants from compression functions * De-duplicate descriptions of the constants Co-authored-by: Victor Stinner <vstinner@python.org>
Documentation for these constants was recently added.
📚 Documentation preview 📚: https://cpython-previews--140115.org.readthedocs.build/