Skip to content
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

python3-zstandard: update to 0.22.0. #49606

Merged
merged 1 commit into from
May 6, 2024

Conversation

unspecd
Copy link
Contributor

@unspecd unspecd commented Mar 30, 2024

Testing the changes

  • I tested the changes in this PR: briefly

Local build testing

  • I built this PR locally for my native architecture, (x86_64-musl)
  • I built this PR locally for these architectures (if supported. mark crossbuilds):

@unspecd
Copy link
Contributor Author

unspecd commented Mar 30, 2024

#49348 (comment)

Copy link
Contributor

@aryalaadi aryalaadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, this fixes the ImportError: zstd C API versions mismatch; I was facing #49348

@tornaria
Copy link
Contributor

tornaria commented Mar 30, 2024

Thanks @unspecd

I'm a bit unsure about the vendored zstd. Have you tried it with the system 1.5.6?

What do you think about the following patch:

--- a/c-ext/backend_c.c	2023-11-01 02:58:34.000000000 -0300
+++ b/c-ext/backend_c.c	2024-03-29 21:32:40.694372789 -0300
@@ -152,7 +152,7 @@
     PyObject *features = NULL;
     PyObject *feature = NULL;
     unsigned zstd_ver_no = ZSTD_versionNumber();
-    unsigned our_hardcoded_version = 10505;
+    unsigned our_hardcoded_version = ZSTD_VERSION_NUMBER;
     if (ZSTD_VERSION_NUMBER != our_hardcoded_version ||
         zstd_ver_no != our_hardcoded_version) {
         PyErr_Format(

This eliminates the hardcoded version; it will still check that the build-time version matches the runtime version, so if zstd is updated then python3-zstandard will need to be rebuilt (and @leahneukirchen placed a note in zstd template to that effect).

@leahneukirchen
Copy link
Member

leahneukirchen commented Mar 31, 2024 via email

@unspecd unspecd force-pushed the python3-zstandard branch from ae46e56 to b2bd443 Compare May 5, 2024 07:36
@tornaria
Copy link
Contributor

tornaria commented May 5, 2024

@leahneukirchen this looks ok now, it seems it would fix #49743, and allows the update in #49348 (the commit here is identical to the second commit in #49348 except for the patch filename).

Note that python3-zstandard will still need to be rebuilt when zstd is updated, there's already a note to that effect in zstd template.

@leahneukirchen leahneukirchen merged commit 5ccf1c6 into void-linux:master May 6, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants