Skip to content

gh-132983: Split _zstd_set_c_parameters #133921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
May 28, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/main' into zstd-set-params
# Conflicts:
#	Modules/_zstd/compressor.c
  • Loading branch information
AA-Turner committed May 24, 2025
commit 6f58a95725ca29717631ce1106d643c9f02c7fc5
6 changes: 4 additions & 2 deletions Modules/_zstd/compressor.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ _zstd_set_c_parameters(ZstdCompressor *self, PyObject *options)
const int key_v = PyLong_AsInt(key);
if (key_v == -1 && PyErr_Occurred()) {
PyErr_SetString(PyExc_ValueError,
"key should be a CompressionParameter attribute.");
"key should be either a "
"CompressionParameter attribute or an int.");
return -1;
}

Expand Down Expand Up @@ -364,7 +365,8 @@ _zstd_ZstdCompressor_new_impl(PyTypeObject *type, Py_ssize_t level,
self->last_mode = ZSTD_e_end;

if (level != PY_SSIZE_T_MIN && options != Py_None) {
PyErr_SetString(PyExc_RuntimeError, "Only one of level or options should be used.");
PyErr_SetString(PyExc_RuntimeError,
"Only one of level or options should be used.");
goto error;
}

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy