Skip to content
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

gh-131418: remove unused legacy typedefs in {md5,sha1}module.c #131420

Merged
merged 1 commit into from
Mar 23, 2025

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Mar 18, 2025

@picnixz
Copy link
Member Author

picnixz commented Mar 19, 2025

I forgot to merge this one this morning. I'm leaving for a few days so I'll merge it on Sunday (with a commit message indicating which typedefs were removed, although it's not really necessary).

@picnixz picnixz self-assigned this Mar 19, 2025
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM. If the code still builds after this change, the code was dead code :-)

@picnixz picnixz merged commit a9a399f into python:main Mar 23, 2025
49 checks passed
@picnixz picnixz deleted the feat/hacl/cleanup-unused-types-131418 branch March 23, 2025 11:19
@picnixz
Copy link
Member Author

picnixz commented Mar 23, 2025

I'll backport them to 3.12 and 3.13, as HACL* MD5 and HACL* SHA-1 are already present. It doesn't hurt (it's also good to reduce the number of lines in the file)

@picnixz picnixz added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Mar 23, 2025
@miss-islington-app
Copy link

Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app
Copy link

Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 23, 2025
pythonGH-131420)

- Remove legacy typedefs `MD5_INT32` and `MD5_INT64` in `Modules/md5module.c`
- Remove legacy typedefs `SHA1_INT32` and `SHA1_INT64` in `Modules/sha1module.c`.

Those legacy typedefs were used to detect whether the host platform could
correctly implement MD5 and SHA-1, but this is no longer needed as we now
fallback to HACL* implementations.
(cherry picked from commit a9a399f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Mar 23, 2025

GH-131619 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Mar 23, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 23, 2025
pythonGH-131420)

- Remove legacy typedefs `MD5_INT32` and `MD5_INT64` in `Modules/md5module.c`
- Remove legacy typedefs `SHA1_INT32` and `SHA1_INT64` in `Modules/sha1module.c`.

Those legacy typedefs were used to detect whether the host platform could
correctly implement MD5 and SHA-1, but this is no longer needed as we now
fallback to HACL* implementations.
(cherry picked from commit a9a399f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Mar 23, 2025

GH-131620 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Mar 23, 2025
picnixz added a commit that referenced this pull request Mar 23, 2025
…c` (GH-131420) (#131619)

gh-131418: remove unused legacy typedefs in `{md5,sha1}module.c` (GH-131420)

- Remove legacy typedefs `MD5_INT32` and `MD5_INT64` in `Modules/md5module.c`
- Remove legacy typedefs `SHA1_INT32` and `SHA1_INT64` in `Modules/sha1module.c`.

Those legacy typedefs were used to detect whether the host platform could
correctly implement MD5 and SHA-1, but this is no longer needed as we now
fallback to HACL* implementations.
(cherry picked from commit a9a399f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
picnixz added a commit that referenced this pull request Mar 23, 2025
…c` (GH-131420) (#131620)

gh-131418: remove unused legacy typedefs in `{md5,sha1}module.c` (GH-131420)

- Remove legacy typedefs `MD5_INT32` and `MD5_INT64` in `Modules/md5module.c`
- Remove legacy typedefs `SHA1_INT32` and `SHA1_INT64` in `Modules/sha1module.c`.

Those legacy typedefs were used to detect whether the host platform could
correctly implement MD5 and SHA-1, but this is no longer needed as we now
fallback to HACL* implementations.
(cherry picked from commit a9a399f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
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