From 463b799160924c53b69a3d26f9c39ec10abdadcb Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Wed, 5 Jan 2022 12:15:31 +0100 Subject: [PATCH 1/2] Correctly use compresslevel in gzip.compress --- Lib/gzip.py | 2 +- Lib/test/test_gzip.py | 9 +++++++++ .../Library/2022-01-18-08-03-19.bpo-46267.vbmuum.rst | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2022-01-18-08-03-19.bpo-46267.vbmuum.rst diff --git a/Lib/gzip.py b/Lib/gzip.py index 6773ea3eef0971..d0376cd9d608d6 100644 --- a/Lib/gzip.py +++ b/Lib/gzip.py @@ -587,7 +587,7 @@ def compress(data, compresslevel=_COMPRESS_LEVEL_BEST, *, mtime=None): header = _create_simple_gzip_header(compresslevel, mtime) trailer = struct.pack(" Date: Mon, 2 May 2022 21:57:22 -0600 Subject: [PATCH 2/2] Delete NEWS file This is now a test-only change, so no need for a NEWS entry. --- .../next/Library/2022-01-18-08-03-19.bpo-46267.vbmuum.rst | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 Misc/NEWS.d/next/Library/2022-01-18-08-03-19.bpo-46267.vbmuum.rst diff --git a/Misc/NEWS.d/next/Library/2022-01-18-08-03-19.bpo-46267.vbmuum.rst b/Misc/NEWS.d/next/Library/2022-01-18-08-03-19.bpo-46267.vbmuum.rst deleted file mode 100644 index a7c0f262aeabae..00000000000000 --- a/Misc/NEWS.d/next/Library/2022-01-18-08-03-19.bpo-46267.vbmuum.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fix an issue in :func:`gzip.compress` where the compression level was not passed -through to the underlying :func:`zlib.compress` function.