This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author larry
Recipients Zooko.Wilcox-O'Hearn, christian.heimes, corona10, jstasiak, kmaork, larry, mgorny, oconnor663, xtreak
Date 2022-03-04.15:59:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Okay, so.  Here's a PR that adds BLAKE3 support to hashlib.

The code was straightforward; I just took the BLAKE2 module and modified it to only have one algorithm.  I also copied over the whole C directory tree from BLAKE3, which is totally okay fine by their license.  I didn't have to modify it a bit.

The tricky part was building it.  Building extension modules is done inside using distutils (or the modern replacement), and in order to get those sexy SIMD implementations I had to compile assembly-language files, or C files with extra flags.  What I did works great on my Linux box, and I have my fingers crossed that it'll work on other POSIX platforms.  I wrote a loooong comment in explaining what I did and why.

Steve: I didn't do anything for Windows support.  Do you have time to take a pass at it?  Or if you know another core dev who does Windows build stuff, please nosy them.  Whoever does the work. I suggest you read for a little guidance on how to build BLAKE3 on Windows with SIMD support.  Also, I see you now build Python for Windows on ARM!  Does this mean Python can use BLAKE3's NEON support?  Maybe it's time to find out!  Get hyped!

Jack and I corresponded last year (or maybe 2020?) about what the API should look like.  The idea is, Jack also maintains a BLAKE3 Python extension on pypi, written in Rust.  Our goal was to make the two types behave identically, so that it could be like the old stringio / cstringio situation.  You can use the built-in one for convenience, but also you can install the Rust version from PyPI for even more performance.  Jack, it wouldn't hurt my feelings overly much if you checked my PR to make sure I got the interface right.
Date User Action Args
2022-03-04 15:59:39larrysetrecipients: + larry, christian.heimes, mgorny, Zooko.Wilcox-O'Hearn, jstasiak, oconnor663, corona10, xtreak, kmaork
2022-03-04 15:59:39larrysetmessageid: <>
2022-03-04 15:59:39larrylinkissue39298 messages
2022-03-04 15:59:39larrycreate