Skip to content

fix: reorder parameters in async_create_ssl_certs and correct typo in…#16

Merged
bybatkhuu merged 1 commit intomainfrom
dev
Feb 25, 2026
Merged

fix: reorder parameters in async_create_ssl_certs and correct typo in…#16
bybatkhuu merged 1 commit intomainfrom
dev

Conversation

@bybatkhuu
Copy link
Owner

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 cryptography package to the requirements and some code cleanups in the async_create_ssl_certs function.

Dependency update:

  • Added cryptography (version >=44.0.3,<47.0.0) to requirements/requirements.crypto.txt to support cryptographic operations.

Code cleanup and bugfixes in SSL certificate creation:

  • Fixed the order of function parameters and their documentation in async_create_ssl_certs to match standard conventions (key_fname and cert_fname order swapped). [1] [2]
  • Corrected a typo in the variable name (_meesage to _message) and updated logger calls accordingly in async_create_ssl_certs.

@bybatkhuu bybatkhuu self-assigned this Feb 25, 2026
Copilot AI review requested due to automatic review settings February 25, 2026 16:29
@bybatkhuu bybatkhuu added the bug Something isn't working label Feb 25, 2026
@bybatkhuu bybatkhuu merged commit b0575ec into main Feb 25, 2026
2 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 cryptography version constraint to requirements/requirements.crypto.txt.
  • Reorder async_create_ssl_certs parameters to key_fname then cert_fname and align docstring.
  • Fix typo _meesage_message in 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,
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
ssl_dir: str,
ssl_dir: str,
*,

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants