https://github.com/python/cpython/commit/41bf8e01268f0db11bd124303c4e5ddea7f72a02 commit: 41bf8e01268f0db11bd124303c4e5ddea7f72a02 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: emmatyping <[email protected]> date: 2026-07-18T00:21:38-07:00 summary:
[3.14] gh-150583: Fix zstd compression level with digested ZstdDict (GH-150586) (#153884) gh-150583: Fix zstd compression level with digested ZstdDict (GH-150586) (cherry picked from commit 0983642c966d9c536416101e99b7d2b085483847) Co-authored-by: Rogdham <[email protected]> files: A Misc/NEWS.d/next/Library/2026-06-03-19-35-32.gh-issue-150583.dedI24.rst M Modules/_zstd/compressor.c diff --git a/Misc/NEWS.d/next/Library/2026-06-03-19-35-32.gh-issue-150583.dedI24.rst b/Misc/NEWS.d/next/Library/2026-06-03-19-35-32.gh-issue-150583.dedI24.rst new file mode 100644 index 000000000000000..edb551b3c3c8cbd --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-06-03-19-35-32.gh-issue-150583.dedI24.rst @@ -0,0 +1,2 @@ +Correctly set the default compression level in :mod:`compression.zstd` when passing a digested +dictionary during compression. diff --git a/Modules/_zstd/compressor.c b/Modules/_zstd/compressor.c index 0125ba022dc066b..fa31d3a0e90abde 100644 --- a/Modules/_zstd/compressor.c +++ b/Modules/_zstd/compressor.c @@ -347,6 +347,7 @@ _zstd_ZstdCompressor_new_impl(PyTypeObject *type, PyObject *level, } self->use_multithread = 0; + self->compression_level = ZSTD_CLEVEL_DEFAULT; self->dict = NULL; self->lock = (PyMutex){0}; _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
