Skip to content

Commit

Permalink
devel/py-marrow.mailer: Fix runtime with Python 3.9+
Browse files Browse the repository at this point in the history
MFH:		2022Q4
  • Loading branch information
dbaio committed Dec 2, 2022
1 parent 94de9f1 commit b765c59
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions 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}
Expand Down
13 changes: 13 additions & 0 deletions 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

0 comments on commit b765c59

Please sign in to comment.