Postal: Don't try to install cryptography on Python 3.8

The cryptography package is no longer installable on PyPy 3.8, because PyO3
requires Python 3.9. Since there were already problems installing cryptography
on darwin-arm64 for cpython 3.8 (and since cpython 3.8 passed EOL on all platforms
last month), just limit Postal's extra dependency on cryptography to Python >=3.9.

If you are using Postal tracking webhooks with Python 3.8, you'll get an ImportError
unless you also install cryptography somehow (or upgrade to Python 3.9 or later).
This commit is contained in:
Mike Edmunds
2024-11-30 14:42:23 -08:00
parent 79aec15784
commit 45848440b3
2 changed files with 16 additions and 2 deletions

View File

@@ -83,8 +83,10 @@ sparkpost = []
unisender-go = []
postal = [
# Postal requires cryptography for verifying webhooks.
# Cryptography's wheels are broken on darwin-arm64 before Python 3.9.
"cryptography; sys_platform != 'darwin' or platform_machine != 'arm64' or python_version >= '3.9'"
# Cryptography's wheels are broken on darwin-arm64 before Python 3.9,
# and unbuildable on PyPy 3.8 due to PyO3 limitations. Since cpython 3.8
# has also passed EOL, just require Python 3.9+ with Postal.
"cryptography; python_version >= '3.9'"
]
[project.urls]