The Windows builds of Python 2.5 need to be updated to build and link the hashlib modules with OpenSSL 0.9.8. The OpenSSL implementations of the hash algorithms are *much* faster (often 2-3x) than the fallback C implementations that python includes for use when OpenSSL isn't available. I just tested the python 2.5b3 installer on windows. its using the fallback versions rather than OpenSSL: here's a simple way to check from a running python: Without OpenSSL: >>> import hashlib >>> hashlib.sha1 With OpenSSL: >>> import hashlib >>> hashlib.sha1 <built-in function openssl_sha1> (please use openssl 0.9.8; older versions don't include sha256 and sha512 implementations)
Logged In: YES user_id=413 i've attached a patch to PCbuild/build_ssl.py that should build the assembly optimized OpenSSL on windows by default. Still todo: a _hashlib.vcproj file is needed. though wouldn't it be easier for me to just build _hashlib.pyd from within the _ssl.mak file?
Logged In: YES user_id=413 attached is a patch that works for me on Win XP with MSVS 2003 (vc++ 7.1): build_hashlib_with_ssl-01.patch It does several things: build_ssl.py -- this is fixed to use do_masm.bat instead of a modified 32all.bat to build OpenSSL with x86 asm optimizations on Win32. It is also fixed to work when under a directory tree with spaces in the directory names. _ssl.mak -- since both _ssl and _hashlib depend on OpenSSL it made the most sense for both to be built by the same makefile. I added _hashlib's build here. _ssl.vcproj -- adds the dependancy on Modules/_hashopenssl.c Things still TODO - make sure _hashlib.pyd is added to the MSI installer.
Logged In: YES user_id=21627 I changed the patch to support the Win64 build process, and added packaging support (msi.py). It looks fine to me now. Anthony, is this ok to apply?