Skip to content

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

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 11 commits into from
Jul 28, 2025

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Jul 22, 2025

@picnixz picnixz changed the title gh-135341: extract _hashlib helpers into a separate directory gh-131876: extract _hashlib helpers into a separate directory Jul 22, 2025
@picnixz picnixz force-pushed the refactor/hashlib/extract-helpers-135341 branch from 93fdbd3 to 59b0cda Compare July 22, 2025 13:23
@picnixz picnixz added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 22, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @picnixz for commit 59b0cda 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136995%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 22, 2025
@picnixz picnixz marked this pull request as ready for review July 25, 2025 14:00
@picnixz
Copy link
Member Author

picnixz commented Jul 27, 2025

I'll first merge the fortication PR, then merge this one where the macros are rewritten are pure functions when possible. I actually wanted to check whether using an exported function vs a static inline function could change a lot the performance (if possible I don't want to make the code significantly slower because I used non-static inline functions).

@gpshead
Copy link
Member

gpshead commented Jul 28, 2025

for these code paths I doubt inline even matters. in general these days I assume the compiler will figure that out for static things, at least in pgo and lto builds.

@picnixz picnixz marked this pull request as draft July 28, 2025 08:11
@picnixz
Copy link
Member Author

picnixz commented Jul 28, 2025

for these code paths I doubt inline even matters. in general these days I assume the compiler will figure that out for static things, at least in pgo and lto builds.

Actually, I was also a bit worried about the exported symbol. I also try to see if I can just live with extern and not with PyAPI_FUNC actually and if everything links correctly, then I'll be able to move the function definitions into a .c file instead.

Otherwise, I'll use static inline for both instead of using PyAPI_FUNC.

EDIT: everything works well with extern

@picnixz
Copy link
Member Author

picnixz commented Jul 28, 2025

Hum. Windows. Ok I don't know how to correct the project so using PyAPI_FUNC should be enough. I think we should find a better way to manage cryptographic modules on Windows as I feel it's confusing (I don't really know what to exactly do...)

@picnixz
Copy link
Member Author

picnixz commented Jul 28, 2025

!buildbot FIPS only

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @picnixz for commit a0fa849 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136995%2Fmerge

The command will test the builders whose names match following regular expression: FIPS only

The builders matched are:

  • AMD64 RHEL8 FIPS Only Blake2 Builtin Hash PR
  • AMD64 CentOS9 FIPS Only Blake2 Builtin Hash PR

@picnixz picnixz marked this pull request as ready for review July 28, 2025 09:17
@picnixz picnixz merged commit 45138d3 into python:main Jul 28, 2025
45 checks passed
@picnixz picnixz deleted the refactor/hashlib/extract-helpers-135341 branch July 28, 2025 09:28
@picnixz
Copy link
Member Author

picnixz commented Jul 28, 2025

I don't think I can backport this as I think it's an ABI change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
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