Skip to content

Commit

Permalink
Postal: Don't try to install cryptography on Python 3.8
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
medmunds committed Nov 30, 2024
1 parent 79aec15 commit 4584844
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 4584844

Please sign in to comment.