SIGN IN SIGN UP

gh-136929: ensure that `hashlib.<name>` does not raise `AttributeError` (#136933)

Previously, if OpenSSL was not present and built-in cryptographic extension modules
were disabled, requesting `hashlib.<name>` raised `AttributeError` and an ERROR log
message with the exception traceback is emitted when importing `hashlib`. 

Now, the named constructor function will always be available but raises a `ValueError`
at runtime indicating that the algorithm is not supported. The log message has also
been reworded to be less verbose.
B
Bénédikt Tran committed
7ce2f101c4b1c123860c90bf67ccc20a7805ea48
Parent: ea06ae5
Committed by GitHub <noreply@github.com> on 7/25/2025, 2:49:09 PM