From c7de22835ee048e750877aee286843bf787b5a94 Mon Sep 17 00:00:00 2001 From: "Danilo G. Baio" Date: Fri, 2 Dec 2022 14:46:51 -0300 Subject: devel/py-marrow.mailer: Fix runtime with Python 3.9+ MFH: 2022Q4 (cherry picked from commit b765c5966e82d572d7d933159f7651d5aae77cb6) --- devel/py-marrow.mailer/Makefile | 1 + devel/py-marrow.mailer/files/patch-marrow_mailer_message.py | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 devel/py-marrow.mailer/files/patch-marrow_mailer_message.py diff --git a/devel/py-marrow.mailer/Makefile b/devel/py-marrow.mailer/Makefile index 2534efe751ac..7d9659644ec8 100644 --- a/devel/py-marrow.mailer/Makefile +++ b/devel/py-marrow.mailer/Makefile @@ -1,5 +1,6 @@ PORTNAME= marrow.mailer PORTVERSION= 4.0.3 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/devel/py-marrow.mailer/files/patch-marrow_mailer_message.py b/devel/py-marrow.mailer/files/patch-marrow_mailer_message.py new file mode 100644 index 000000000000..64d50b234ad6 --- /dev/null +++ b/devel/py-marrow.mailer/files/patch-marrow_mailer_message.py @@ -0,0 +1,13 @@ +# base64.encodestring() +# Deprecated alias of encodebytes(), removed in Python 3.9 +--- marrow/mailer/message.py.orig 2019-09-16 00:05:09 UTC ++++ marrow/mailer/message.py +@@ -305,7 +305,7 @@ class Message(object): + else: + raise TypeError("Unable to read attachment contents") + +- part.set_payload(base64.encodestring(value)) ++ part.set_payload(base64.encodebytes(value)) + + if not filename: + filename = name -- cgit v1.2.3