News for hackers. Stuff that matters.
Re:Python Cryptography, Rust, and Gentoo by Caligatio on Thursday February 11, 2021 @01:28AM (#26098846)
I've had my own run-ins with issues surrounding trying to use Cryptography and hitting compile troubles. A few months back I made a source distribution (sdist) of an internal Python module using Poetry and tried building an Alpine-based container that used it. Because I made a sdist, installing it required Poetry to "compile", and Poetry has a dependency chain down to Cryptography. Because Python/PyPi doesn't support musl-compiled native libraries, I found myself having to install a several hundred MB toolchain to basically copy a Python script to the correct location. I think Poetry now ships a stripped down version of its build engine that doesn't have this dependency so problem solved-ish.

Admittedly I haven't looked at the Cryptography code base to see how much it depends on native code but I wish people made a conscious effort to consider the downstream ramifications of including a particular dependency. I am the maintainer of a quasi-popular JavaScript library and I deliberately wrote my own helper functions for things like base64/UTF-8 conversion just to avoid potential issues (it's been around since 2008 so JavaScript was also a hot mess at the time).

Re:Python Cryptography, Rust, and Gentoo by danieldk on Thursday February 11, 2021 @01:39AM (#26098902)
Is there any reason why you use Alpine for Python app containers?

https://pythonspeed.com/articles/alpine-docker-python/

Re:Python Cryptography, Rust, and Gentoo by Caligatio on Thursday February 11, 2021 @01:48AM (#26098938)
I was heavily optimizing for image size due to certain users being on absolutely terrible connections.
Re:Python Cryptography, Rust, and Gentoo by yegle on Thursday February 11, 2021 @03:19AM (#26099404)
Try Distroless, Debian/glibc based.
Re:Python Cryptography, Rust, and Gentoo by Caligatio on Monday February 15, 2021 @07:34AM (#26142122)
I hadn't heard of this, I'll have to check it out!