Skip to content

gh-131876: extract _hashlib helpers into a separate directory #137319

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 1 commit into
base: main
Choose a base branch
from

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Aug 2, 2025

So this reverts the revert and fixes the WASM build. The WASI build was not affected but it should have been I think but I can't seem to make it fail (maybe duplicated symbols are allowed?)

@picnixz picnixz force-pushed the feat/hashlib/static-library-131876 branch 2 times, most recently from 259a802 to ffe7db7 Compare August 2, 2025 10:06
…python#136995)

The `Modules/hashlib.h` helper file is now removed and split into multiple files:

* `Modules/_hashlib/hashlib_buffer.h` -- Utilities for getting a buffer view and handling buffer inputs.
* `Modules/_hashlib/hashlib_fetch.h` -- Utilities used when fetching a message digest from a digest-like identifier.
  Currently, this file only contains common error messages as the fetching API is not yet implemented.
* `Modules/_hashlib/hashlib_mutex.h` -- Utilities for managing the lock on cryptographic hash objects.
@picnixz picnixz force-pushed the feat/hashlib/static-library-131876 branch from ffe7db7 to 2fb8a6c Compare August 2, 2025 10:08
@picnixz picnixz added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 2, 2025
@bedevere-bot

This comment was marked as resolved.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 2, 2025
@picnixz picnixz marked this pull request as ready for review August 2, 2025 16:52
@serhiy-storchaka
Copy link
Member

What is the point of splitting a header file into three?

@picnixz
Copy link
Member Author

picnixz commented Aug 3, 2025

Maintainability for me. This will grow into more code when I plan to move some of the OpenSSL fetch interface from _hashopenssl there as I want to be able to use it in HMAC as well. However I had linker issues :( so for now I wanted to lay out the structure first.

What I can do is hold this change and design the fetch API. Then merge both of them at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy