Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the crypto optional dependency set and tidies the async SSL certificate generator to align its public API with the sync implementation.
Changes:
- Add
cryptographyversion constraint torequirements/requirements.crypto.txt. - Reorder
async_create_ssl_certsparameters tokey_fnamethencert_fnameand align docstring. - Fix typo
_meesage→_messagein log message handling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/potato_util/crypto/ssl/_async.py |
Align async SSL cert creation API/doc with the sync version; fix logging variable typo. |
requirements/requirements.crypto.txt |
Declare cryptography as an explicit crypto extra dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -28,8 +28,8 @@ | |||
| @validate_call | |||
| async def async_create_ssl_certs( | |||
| ssl_dir: str, | |||
There was a problem hiding this comment.
Reordering key_fname/cert_fname in the public async_create_ssl_certs signature is a breaking change for any callers using positional arguments (the function is re-exported via potato_util.crypto.ssl.__init__). Consider making these parameters keyword-only (e.g., insert * after ssl_dir) or keeping backward compatibility via a deprecation shim so existing positional calls don’t silently swap key/cert paths.
| ssl_dir: str, | |
| ssl_dir: str, | |
| *, |
This pull request introduces a new dependency and makes minor improvements to the asynchronous SSL certificate creation utility. The most significant changes are the addition of the
cryptographypackage to the requirements and some code cleanups in theasync_create_ssl_certsfunction.Dependency update:
cryptography(version >=44.0.3,<47.0.0) torequirements/requirements.crypto.txtto support cryptographic operations.Code cleanup and bugfixes in SSL certificate creation:
async_create_ssl_certsto match standard conventions (key_fnameandcert_fnameorder swapped). [1] [2]_meesageto_message) and updated logger calls accordingly inasync_create_ssl_certs.