Skip to content

fix: bump minimum cryptography dependency to >= 39.0.0#377

Merged
simo5 merged 1 commit into
latchset:mainfrom
xyaz1313:fix/cryptography-min-version
Apr 14, 2026
Merged

fix: bump minimum cryptography dependency to >= 39.0.0#377
simo5 merged 1 commit into
latchset:mainfrom
xyaz1313:fix/cryptography-min-version

Conversation

@xyaz1313
Copy link
Copy Markdown
Contributor

Problem

The unsafe_skip_rsa_key_validation kwarg used in jwk.py at lines 842 and 1000 was added to the cryptography library in version 39.0.0 (PR #7667).

However, pyproject.toml only requires cryptography >= 3.4, which means pip can install jwcrypto 1.5.7 with an older cryptography that lacks this parameter, causing:

TypeError: load_pem_private_key() got an unexpected keyword argument "unsafe_skip_rsa_key_validation"

Fix

Bump the minimum version in pyproject.toml:

-    "cryptography >= 3.4",
+    "cryptography >= 39.0.0",

Verification

  • Confirmed unsafe_skip_rsa_key_validation is present in both load_pem_private_key() and RSAPrivateNumbers.private_key() starting from cryptography 39.0.0
  • The parameter name has not changed since introduction (a rename PR #8470 was closed without merging)
  • All existing functionality is preserved — this is purely a dependency constraint fix

Fixes #376

The  kwarg used in jwk.py lines 842
and 1000 was added to cryptography in version 39.0.0 (PR #7667).

Without this bump, pip can install jwcrypto 1.5.7 with cryptography
< 39.0.0, causing:

  TypeError: load_pem_private_key() got an unexpected keyword argument
  'unsafe_skip_rsa_key_validation'

Fixes latchset#376
Copy link
Copy Markdown
Member

@simo5 simo5 left a comment

Choose a reason for hiding this comment

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

Thanks!

@simo5 simo5 merged commit db03d4c into latchset:main Apr 14, 2026
17 checks passed
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.

1.5.7 relies on cryptography 45.0 but only requires 3.4

2 participants