aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanilo G. Baio <dbaio@FreeBSD.org>2022-12-02 17:46:51 +0000
committerDanilo G. Baio <dbaio@FreeBSD.org>2022-12-02 22:30:05 +0000
commitc7de22835ee048e750877aee286843bf787b5a94 (patch)
tree78d417d7c207fa713dc0debf419a07ccfb12c3ca
parent7ed174446ca07cfa35f643fa9ae84a61a774c3e3 (diff)
downloadports-c7de22835ee048e750877aee286843bf787b5a94.tar.gz
ports-c7de22835ee048e750877aee286843bf787b5a94.zip
devel/py-marrow.mailer: Fix runtime with Python 3.9+
MFH: 2022Q4 (cherry picked from commit b765c5966e82d572d7d933159f7651d5aae77cb6)
-rw-r--r--devel/py-marrow.mailer/Makefile1
-rw-r--r--devel/py-marrow.mailer/files/patch-marrow_mailer_message.py13
2 files changed, 14 insertions, 0 deletions
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