-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-127667: refactor and improve _hashopenssl.c
error branches
#131145
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-127667: refactor and improve _hashopenssl.c
error branches
#131145
Conversation
I'm backporting this because future changes will likely have conflicts since error branches would be handled differently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, nice refactoring for better maintainability.
Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
Sorry, @picnixz, I could not cleanly backport this to
|
Sorry, @picnixz, I could not cleanly backport this to
|
…python#131145) Refactor `_setException()` into different helpers that can be used separately: - set_ssl_exception_from_errcode(): set an exception from an explicit SSL error code. - raise_ssl_error(): set an exception from the last SSL error code or use a user-defined message. - notify_ssl_error_occurred(): same as raise_ssl_error() but with a generic default message.
GH-131347 is a backport of this pull request to the 3.13 branch. |
…python#131145) Refactor `_setException()` into different helpers that can be used separately: - set_ssl_exception_from_errcode(): set an exception from an explicit SSL error code. - raise_ssl_error(): set an exception from the last SSL error code or use a user-defined message. - notify_ssl_error_occurred(): same as raise_ssl_error() but with a generic default message. # Conflicts: # Modules/_hashopenssl.c
GH-131348 is a backport of this pull request to the 3.12 branch. |
…python#131145) Refactor `_setException()` into different helpers that can be used separately: - set_ssl_exception_from_errcode(): set an exception from an explicit SSL error code. - raise_ssl_error(): set an exception from the last SSL error code or use a user-defined message. - notify_ssl_error_occurred(): same as raise_ssl_error() but with a generic default message.
#131145) (#131348) gh-127667: refactor and improve `_hashopenssl.c` error branches (#131145) Refactor `_setException()` into different helpers that can be used separately: - set_ssl_exception_from_errcode(): set an exception from an explicit SSL error code. - raise_ssl_error(): set an exception from the last SSL error code or use a user-defined message. - notify_ssl_error_occurred(): same as raise_ssl_error() but with a generic default message. (cherry-picked from commit ac50ece).
#131145) (#131347) gh-127667: refactor and improve `_hashopenssl.c` error branches (#131145) Refactor `_setException()` into different helpers that can be used separately: - set_ssl_exception_from_errcode(): set an exception from an explicit SSL error code. - raise_ssl_error(): set an exception from the last SSL error code or use a user-defined message. - notify_ssl_error_occurred(): same as raise_ssl_error() but with a generic default message. (cherry-picked from commit ac50ece).
…python#131145) Refactor `_setException()` into different helpers that can be used separately: - set_ssl_exception_from_errcode(): set an exception from an explicit SSL error code. - raise_ssl_error(): set an exception from the last SSL error code or use a user-defined message. - notify_ssl_error_occurred(): same as raise_ssl_error() but with a generic default message.
Previously, we had a single
_setException()
helper and most of the time, we always did the same thing. Sometimes it's also not necessary to actually create ava_list
.hashlib
#127667