diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-06-17 06:06:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-17 06:06:11 (GMT) |
commit | 3b28e430edfb60964fb3a34d2971d21a9200a4f9 (patch) | |
tree | 54d08365a3ca0bdc72f233f2ae7beb5e3fe51d78 /Doc/whatsnew | |
parent | aa39ba0af33dce8736a4973be48929d02fb5261e (diff) | |
download | cpython-3b28e430edfb60964fb3a34d2971d21a9200a4f9.zip cpython-3b28e430edfb60964fb3a34d2971d21a9200a4f9.tar.gz cpython-3b28e430edfb60964fb3a34d2971d21a9200a4f9.tar.bz2 |
[3.13] gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 (GH-120480) (#120612)
gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 (GH-120480)
(cherry picked from commit bac4edad69bb20dd9460766e062637cae999e1e0)
gh-112346: Describe the "os" byte in gzip output change.
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.11.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 7a74df3..b601bd4 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -768,6 +768,21 @@ functools (Contributed by Yurii Karabas in :issue:`46014`.) +.. _whatsnew311-gzip: + +gzip +---- + +* The :func:`gzip.compress` function is now faster when used with the + **mtime=0** argument as it delegates the compression entirely to a single + :func:`zlib.compress` operation. There is one side effect of this change: The + gzip file header contains an "OS" byte in its header. That was traditionally + always set to a value of 255 representing "unknown" by the :mod:`gzip` + module. Now, when using :func:`~gzip.compress` with **mtime=0**, it may be + set to a different value by the underlying zlib C library Python was linked + against. + (See :gh:`112346` for details on the side effect.) + .. _whatsnew311-hashlib: hashlib |