GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Ensure that `hashlib.<name>` does not raise `AttributeError` · Issue #136929 · python/cpython Closed Labels stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement DescriptionFeature or enhancementProposal:Let's summarize the current behavior of hashlib. We have two interfaces for getting digests: With With On the other hand, if the security policy doesn't allow it, then we still set Now, as I said, the problem is about import hashlib when neither OpenSSL nor HACL* are present. Instead of raising an AttributeError when trying to access the function, we should either raise an ImportError, or create mock functions for hash functions that raise ValueError at runtime (which would be ideal IMO). That way, we can ensure that tests using cryptographic hashes are decorated with "@requires_hashdigest" and make build bots that are match by "FIPS" successful. The case for blake2 is a bit different because we actually do not care about OpenSSL at all! IOW, Has this already been discussed elsewhere?This is a minor feature, which does not need previous discussion elsewhere Links to previous discussion of this feature:No response Linked PRsActivity
MetadataMetadataAssigneesLabelsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |