pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/py-flask-sendmail py-flask-sendmail: improve and i...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2a6e9be442b1
branches: trunk
changeset: 453768:2a6e9be442b1
user: khorben <khorben%pkgsrc.org@localhost>
date: Wed Jun 02 21:06:03 2021 +0000
description:
py-flask-sendmail: improve and import a couple fixes
The updated patches:
- fix the suppressing of messages when testing or disabled in configuration;
- import what should be a better fix when piping messages to sendmail(1).
Bumps PKGREVISION.
diffstat:
www/py-flask-sendmail/Makefile | 3 +-
www/py-flask-sendmail/PLIST | 2 +-
www/py-flask-sendmail/distinfo | 5 +-
www/py-flask-sendmail/patches/patch-flask__sendmail_connection.py | 20 +++++---
www/py-flask-sendmail/patches/patch-flask__sendmail_message.py | 22 ++++++++++
5 files changed, 40 insertions(+), 12 deletions(-)
diffs (93 lines):
diff -r 645cc56b5072 -r 2a6e9be442b1 www/py-flask-sendmail/Makefile
--- a/www/py-flask-sendmail/Makefile Wed Jun 02 20:05:20 2021 +0000
+++ b/www/py-flask-sendmail/Makefile Wed Jun 02 21:06:03 2021 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1 2021/05/27 22:25:05 khorben Exp $
+# $NetBSD: Makefile,v 1.2 2021/06/02 21:06:03 khorben Exp $
DISTNAME= Flask-Sendmail-0.1
PKGNAME= ${PYPKGPREFIX}-${DISTNAME:tl}
+PKGREVISION= 1
CATEGORIES= www python
MASTER_SITES= ${MASTER_SITE_PYPI:=F/Flask-Sendmail/}
diff -r 645cc56b5072 -r 2a6e9be442b1 www/py-flask-sendmail/PLIST
--- a/www/py-flask-sendmail/PLIST Wed Jun 02 20:05:20 2021 +0000
+++ b/www/py-flask-sendmail/PLIST Wed Jun 02 21:06:03 2021 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2021/05/27 22:25:05 khorben Exp $
+@comment $NetBSD: PLIST,v 1.2 2021/06/02 21:06:03 khorben Exp $
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
diff -r 645cc56b5072 -r 2a6e9be442b1 www/py-flask-sendmail/distinfo
--- a/www/py-flask-sendmail/distinfo Wed Jun 02 20:05:20 2021 +0000
+++ b/www/py-flask-sendmail/distinfo Wed Jun 02 21:06:03 2021 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.1 2021/05/27 22:25:05 khorben Exp $
+$NetBSD: distinfo,v 1.2 2021/06/02 21:06:03 khorben Exp $
SHA1 (Flask-Sendmail-0.1.tar.gz) = 6ac44c275a3d9dce4ed3d028335537ed19e67cef
RMD160 (Flask-Sendmail-0.1.tar.gz) = 7b79b89250b9376ff5f9f2f1d1b3b0508c861a6a
SHA512 (Flask-Sendmail-0.1.tar.gz) = c341d841a5ea2ff06d60361bf323fd3d9bce1b332143da415534e9176d797fbd5bd59ea9b7563a81e35dbe93dcbb6d957f02df61bd191b385eb834638133aecd
Size (Flask-Sendmail-0.1.tar.gz) = 3410 bytes
-SHA1 (patch-flask__sendmail_connection.py) = 8ec1db04739ffe9d41006c68b3670f97a39ae8cc
+SHA1 (patch-flask__sendmail_connection.py) = bcc2161f5f1d5bcaa67a67b319554e3d41ee0e97
+SHA1 (patch-flask__sendmail_message.py) = 7aa1f56237e7ae3704eb98060dded53222ed29a1
diff -r 645cc56b5072 -r 2a6e9be442b1 www/py-flask-sendmail/patches/patch-flask__sendmail_connection.py
--- a/www/py-flask-sendmail/patches/patch-flask__sendmail_connection.py Wed Jun 02 20:05:20 2021 +0000
+++ b/www/py-flask-sendmail/patches/patch-flask__sendmail_connection.py Wed Jun 02 21:06:03 2021 +0000
@@ -1,15 +1,19 @@
-$NetBSD: patch-flask__sendmail_connection.py,v 1.1 2021/05/27 22:25:05 khorben Exp $
+$NetBSD: patch-flask__sendmail_connection.py,v 1.2 2021/06/02 21:06:03 khorben Exp $
-Fix type error when sending messages
+Do not send messages when testing or disabled in configuration
+
+Submitted upstream in PR #12 (at
+https://github.com/ajford/flask-sendmail/pull/12).
--- flask_sendmail/connection.py.orig 2012-04-23 02:11:53.000000000 +0000
+++ flask_sendmail/connection.py
-@@ -20,7 +20,7 @@ class Connection(object):
+@@ -18,6 +18,9 @@ class Connection(object):
+ pass
+
def send(self, message):
++ if self.suppress:
++ return 0
++
sm = Popen([self.mail.mailer, self.mail.mailer_flags], stdin=PIPE,
stdout=PIPE, stderr=STDOUT)
-- sm.stdin.write(message.dump())
-+ sm.stdin.write(message.dump().encode())
- sm.communicate()
-
- return sm.returncode
+ sm.stdin.write(message.dump())
diff -r 645cc56b5072 -r 2a6e9be442b1 www/py-flask-sendmail/patches/patch-flask__sendmail_message.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/py-flask-sendmail/patches/patch-flask__sendmail_message.py Wed Jun 02 21:06:03 2021 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-flask__sendmail_message.py,v 1.1 2021/06/02 21:06:03 khorben Exp $
+
+Fix for Python 3
+
+From commit cc55636201554d1cf8516bb5bf0326bb498d03a7 in the flask-sendmail-ng
+fork at https://github.com/ncrocfer/flask-sendmail-ng.
+
+--- flask_sendmail/message.py.orig 2012-04-23 02:41:10.000000000 +0000
++++ flask_sendmail/message.py
+@@ -99,7 +99,11 @@ class Message(object):
+ if self.reply_to:
+ msg['Reply-To'] = self.reply_to
+
+- return msg.as_string()
++ msg_str = msg.as_string()
++ if sys.version_info >= (3,0) and isinstance(msg_str, str):
++ return msg_str.encode(self.charset or 'utf-8')
++ else:
++ return msg_str
+
+ def send(self, connection):
+ """
Home |
Main Index |
Thread Index |
Old Index