-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
gh-91349: Replace zlib with zlib-ng in Windows build #131438
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
Changes from all commits
de56164
1347c50
7fd8f26
f919749
fb6500d
89d44a1
08eecb1
548daa7
f108044
085fa10
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Replaces our copy of ``zlib`` with ``zlib-ng``, for performance improvements | ||
in :mod:`zlib`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2101,6 +2101,12 @@ zlib_exec(PyObject *mod) | |
PyUnicode_FromString(zlibVersion())) < 0) { | ||
return -1; | ||
} | ||
#ifdef ZLIBNG_VERSION | ||
if (PyModule_Add(mod, "ZLIBNG_VERSION", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Figured we'd want some way to detect this other than looking at the text in ZLIB_VERSION There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. makes sense. annoying to have optional attributes that one would use hasattr or getattr on instead of blindly accessing, but realistically nobody should care as this is more internal informational so this is fine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, the main place it'll be used is in pythoninfo, which already handles absent attributes. We have more offensive optional attributes in our extension modules 😆 |
||
PyUnicode_FromString(ZLIBNG_VERSION)) < 0) { | ||
return -1; | ||
} | ||
#endif | ||
if (PyModule_AddStringConstant(mod, "__version__", "1.0") < 0) { | ||
return -1; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll admit I just guessed this, in order to unblock my testing (couldn't build at all with an invalid SBOM). If it's not right, let me know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely the CPE that would get used, although we can't be for certain until a CVE exists with it... the only one I could find with some searching is
cpe:...:zlib-ng:minizip-ng
which is for a different component but at least the organization is a match.