Conversation
Our cryptography wheel silently loses six ciphers that the official PyPI wheel supports. Point the build at the builder's static OpenSSL so the wheel comes out the same shape upstream ships. OpenSSL dlopens its providers, and auditwheel only follows DT_NEEDED, so ossl-modules/legacy.so never makes it into the wheel. The libcrypto that does get bundled has MODULESDIR compiled to builder paths that do not exist wherever the wheel is installed, so OSSL_PROVIDER_load(NULL, "legacy") fails at import and Blowfish, CAST5, IDEA, SEED, ARC4 and RC2 all raise UnsupportedAlgorithm. Since 50.x that load failure is only a warning rather than an error, so the import succeeds and wheel-check passes on a wheel with six dead ciphers. cryptography is not on the index at the moment. 1dcf826 (2026-08-31) removed it along with pillow, pyarrow, numpy, lxml, cffi and freeze-core and denylisted all seven against re-publication as transitive dependencies, "due to incompatible native library bundling". For cryptography, this is that incompatible bundling. So this file is a precondition for putting the package back, not a repair to something users are pulling today. Upstream sidesteps the whole problem by embedding OpenSSL in _rust.abi3.so. OPENSSL_DIR and OPENSSL_STATIC make openssl-sys do the same against the static, no-module OpenSSL the builder now provides. Measured on cryptography 50.0.1, built from sdist in the builder image, repaired with auditwheel, exercised on python:3.12-slim: _rust.abi3.so bundled libs legacy ciphers today 6.32 MB libcrypto, libssl 1 of 7 with this 13.66 MB none 7 of 7 PyPI wheel 14.39 MB none 7 of 7 the 1 that works today is TripleDES, which lives in the default provider. DT_NEEDED on the extension module is identical to PyPI's. Requires the builder image to provide /opt/_internal/static-openssl. That prefix is deliberately off PKG_CONFIG_PATH and out of ldconfig, so this file is the only thing that reaches it and no other package is affected. The path is a version-independent symlink. Like overrides/settings/pillow.yaml, this does not itself trigger a rebuild -- identify-packages only diffs onboarded_packages -- so it takes effect on cryptography's next version bump. Assisted-by: Claude Opus 5 <noreply@anthropic.com>
Reviewer's GuideAdds cryptography build settings that embed the builder’s static, no-module OpenSSL into _rust.abi3.so instead of bundling dynamic OpenSSL libraries, preserving all legacy ciphers and avoiding broken provider paths in repaired wheels. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our cryptography wheel silently loses six ciphers that the official PyPI wheel supports. Point the build at the builder's static OpenSSL so the wheel comes out the same shape upstream ships.
OpenSSL dlopens its providers, and auditwheel only follows DT_NEEDED, so ossl-modules/legacy.so never makes it into the wheel. The libcrypto that does get bundled has MODULESDIR compiled to builder paths that do not exist wherever the wheel is installed, so OSSL_PROVIDER_load(NULL, "legacy") fails at import and Blowfish, CAST5, IDEA, SEED, ARC4 and RC2 all raise UnsupportedAlgorithm. Since 50.x that load failure is only a warning rather than an error, so the import succeeds and wheel-check passes on a wheel with six dead ciphers.
cryptography is not on the index at the moment. 1dcf826 (2026-08-31) removed it along with pillow, pyarrow, numpy, lxml, cffi and freeze-core and denylisted all seven against re-publication as transitive dependencies, "due to incompatible native library bundling". For cryptography, this is that incompatible bundling. So this file is a precondition for putting the package back, not a repair to something users are pulling today.
Upstream sidesteps the whole problem by embedding OpenSSL in _rust.abi3.so. OPENSSL_DIR and OPENSSL_STATIC make openssl-sys do the same against the static, no-module OpenSSL the builder now provides.
Measured on cryptography 50.0.1, built from sdist in the builder image, repaired with auditwheel, exercised on python:3.12-slim:
the 1 that works today is TripleDES, which lives in the default
provider. DT_NEEDED on the extension module is identical to PyPI's.
Requires the builder image to provide /opt/_internal/static-openssl. That prefix is deliberately off PKG_CONFIG_PATH and out of ldconfig, so this file is the only thing that reaches it and no other package is affected. The path is a version-independent symlink.
Like overrides/settings/pillow.yaml, this does not itself trigger a rebuild -- identify-packages only diffs onboarded_packages -- so it takes effect on cryptography's next version bump.
Assisted-by: Claude Opus 5 noreply@anthropic.com
Summary by Sourcery
Configure cryptography to statically embed OpenSSL so redistributed wheels retain full legacy-cipher support.
Bug Fixes:
Enhancements:
Build: