summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-15 19:10:50 (GMT)
committerGitHub <noreply@github.com>2024-06-15 19:10:50 (GMT)
commita19bb261a327e1008f219b62f6465941c981899b (patch)
tree852044786ae198b001217255a5d1d8ffb0abd0bb /Doc
parent3a9f438c923f6835fab608de65e44281e3f71b79 (diff)
downloadcpython-a19bb261a327e1008f219b62f6465941c981899b.zip
cpython-a19bb261a327e1008f219b62f6465941c981899b.tar.gz
cpython-a19bb261a327e1008f219b62f6465941c981899b.tar.bz2
[3.13] gh-112346: Always set OS byte to 255, simpler gzip.compress function. (GH-120486) (#120563)
gh-112346: Always set OS byte to 255, simpler gzip.compress function. (GH-120486) This matches the output behavior in 3.10 and earlier; the optimization in 3.11 allowed the zlib library's "os" value to be filled in instead in the circumstance when mtime was 0. this keeps things consistent. (cherry picked from commit 08d09cf5ba041c9c5c3860200b56bab66fd44a23) Co-authored-by: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/gzip.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/Doc/library/gzip.rst b/Doc/library/gzip.rst
index 965da59..152cba4 100644
--- a/Doc/library/gzip.rst
+++ b/Doc/library/gzip.rst
@@ -188,9 +188,7 @@ The module defines the following items:
Compress the *data*, returning a :class:`bytes` object containing
the compressed data. *compresslevel* and *mtime* have the same meaning as in
- the :class:`GzipFile` constructor above. When *mtime* is set to ``0``, this
- function is equivalent to :func:`zlib.compress` with *wbits* set to ``31``.
- The zlib function is faster.
+ the :class:`GzipFile` constructor above.
.. versionadded:: 3.2
.. versionchanged:: 3.8
@@ -200,6 +198,10 @@ The module defines the following items:
streamed fashion. Calls with *mtime* set to ``0`` are delegated to
:func:`zlib.compress` for better speed.
+ .. versionchanged:: 3.13
+ The gzip header OS byte is guaranteed to be set to 255 when this function
+ is used as was the case in 3.10 and earlier.
+
.. function:: decompress(data)
Decompress the *data*, returning a :class:`bytes` object containing the