Skip to content

gh-135571: Guard _hashlib usage in test_hashlib.py #135572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

WillChilds-Klein
Copy link
Contributor

@WillChilds-Klein WillChilds-Klein commented Jun 16, 2025

@zware zware changed the title gh-135571: Guard _hahslib usage in test_hashlib.py gh-135571: Guard _hashlib usage in test_hashlib.py Jun 16, 2025
Co-authored-by: Bénédikt Tran <[email protected]>
@WillChilds-Klein WillChilds-Klein requested a review from picnixz June 16, 2025 19:27
# Make sure that _hashlib contains the constructor
# to test when using a combination of libcrypto and
# interned hash implementations.
if self._hashlib and digest_name in self._hashlib._constructors:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, this seems the correct way to guard it but there are other places where we do self._hashlib.new('md5') and this works because all libcrypto libs actually expose 'md5'. Id assume that the issue is with blake2 right? or is it another hash function that is causing the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting merge skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants