Skip to content

gh-134531: prefer using _hashlib module state instead of module object #136865

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

Merged
merged 7 commits into from
Jul 20, 2025

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Jul 20, 2025

In order to work on gh-134531, I actually observed that I'm always using the state object itself. By changing the signatures of EVP_MD getters & co, I can simplify the code a bit.

nachocab and others added 5 commits July 20, 2025 14:40
Co-authored-by: Nacho Caballero <nacho.caballero@astrazeneca.com>
Add an example on how to write a tarfile to stdout; general improvements.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
…ests (python#136762)

- Fix `hashlib_helper.block_algorithm` where the dummy functions were incorrectly defined.
- Rename `hashlib_helper.HashAPI` to `hashlib_helper.HashInfo` and add more helper methods.
- Simplify `hashlib_helper.requires_*()` functions.
- Rewrite some private helpers in `hashlib_helper`.
- Remove `find_{builtin,openssl}_hashdigest_constructor()` as they are no more needed and were
  not meant to be public in the first place.
- Fix some tests in `test_hashlib` when FIPS mode is on.
@picnixz
Copy link
Member Author

picnixz commented Jul 20, 2025

Sorry for the ping

@picnixz picnixz marked this pull request as ready for review July 20, 2025 12:46
@picnixz picnixz enabled auto-merge (squash) July 20, 2025 12:51
@picnixz picnixz merged commit 4a151ca into python:main Jul 20, 2025
42 checks passed
@picnixz picnixz deleted the feat/hashlib/use-modstate-134531 branch July 20, 2025 13:27
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