From 45848440b3727d8236bdae8c4b2b081705d66f7a Mon Sep 17 00:00:00 2001 From: Mike Edmunds Date: Sat, 30 Nov 2024 14:42:23 -0800 Subject: [PATCH] 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). --- CHANGELOG.rst | 12 ++++++++++++ pyproject.toml | 6 ++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e21191a0..5bd950f1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -25,6 +25,18 @@ Release history ^^^^^^^^^^^^^^^ .. This extra heading level keeps the ToC from becoming unmanageably long +vNext +----- + +*Unreleased changes* + +Breaking changes +~~~~~~~~~~~~~~~~ + +* **Postal:** Require Python 3.9 or later for Postal tracking webhook support. + (Postal's signature verification uses the "cryptography" package, which is no + longer reliably installable with Python 3.8.) + v12.0 ----- diff --git a/pyproject.toml b/pyproject.toml index b4f67861..23326dde 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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]