pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/www/py-flask-sendmail
Module Name: pkgsrc
Committed By: khorben
Date: Wed Jun 2 21:06:03 UTC 2021
Modified Files:
pkgsrc/www/py-flask-sendmail: Makefile PLIST distinfo
pkgsrc/www/py-flask-sendmail/patches:
patch-flask__sendmail_connection.py
Added Files:
pkgsrc/www/py-flask-sendmail/patches: patch-flask__sendmail_message.py
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/www/py-flask-sendmail/Makefile \
pkgsrc/www/py-flask-sendmail/PLIST pkgsrc/www/py-flask-sendmail/distinfo
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/www/py-flask-sendmail/patches/patch-flask__sendmail_connection.py
cvs rdiff -u -r0 -r1.1 \
pkgsrc/www/py-flask-sendmail/patches/patch-flask__sendmail_message.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/www/py-flask-sendmail/Makefile
diff -u pkgsrc/www/py-flask-sendmail/Makefile:1.1 pkgsrc/www/py-flask-sendmail/Makefile:1.2
--- pkgsrc/www/py-flask-sendmail/Makefile:1.1 Thu May 27 22:25:05 2021
+++ pkgsrc/www/py-flask-sendmail/Makefile Wed Jun 2 21:06:03 2021
@@ -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/}
Index: pkgsrc/www/py-flask-sendmail/PLIST
diff -u pkgsrc/www/py-flask-sendmail/PLIST:1.1 pkgsrc/www/py-flask-sendmail/PLIST:1.2
--- pkgsrc/www/py-flask-sendmail/PLIST:1.1 Thu May 27 22:25:05 2021
+++ pkgsrc/www/py-flask-sendmail/PLIST Wed Jun 2 21:06:03 2021
@@ -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
Index: pkgsrc/www/py-flask-sendmail/distinfo
diff -u pkgsrc/www/py-flask-sendmail/distinfo:1.1 pkgsrc/www/py-flask-sendmail/distinfo:1.2
--- pkgsrc/www/py-flask-sendmail/distinfo:1.1 Thu May 27 22:25:05 2021
+++ pkgsrc/www/py-flask-sendmail/distinfo Wed Jun 2 21:06:03 2021
@@ -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
Index: pkgsrc/www/py-flask-sendmail/patches/patch-flask__sendmail_connection.py
diff -u pkgsrc/www/py-flask-sendmail/patches/patch-flask__sendmail_connection.py:1.1 pkgsrc/www/py-flask-sendmail/patches/patch-flask__sendmail_connection.py:1.2
--- pkgsrc/www/py-flask-sendmail/patches/patch-flask__sendmail_connection.py:1.1 Thu May 27 22:25:05 2021
+++ pkgsrc/www/py-flask-sendmail/patches/patch-flask__sendmail_connection.py Wed Jun 2 21:06:03 2021
@@ -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())
Added files:
Index: pkgsrc/www/py-flask-sendmail/patches/patch-flask__sendmail_message.py
diff -u /dev/null pkgsrc/www/py-flask-sendmail/patches/patch-flask__sendmail_message.py:1.1
--- /dev/null Wed Jun 2 21:06:03 2021
+++ pkgsrc/www/py-flask-sendmail/patches/patch-flask__sendmail_message.py Wed Jun 2 21:06:03 2021
@@ -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