summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkleink <kleink@pkgsrc.org>2013-09-23 20:36:27 +0000
committerkleink <kleink@pkgsrc.org>2013-09-23 20:36:27 +0000
commit202b0c35c65c0d34f8b97652faa42548ff92499e (patch)
tree76de8883ed11d7ec5e62b1d3f727a067af951161
parent8a2b83405c4b1dbc4acd6885e520bef4c66e0e57 (diff)
downloadpkgsrc-202b0c35c65c0d34f8b97652faa42548ff92499e.tar.gz
Add upstream commit 723c40a8153d20dce0c6dd1a91f193ef0375a194 via patch:
Update ext.appengine.fields for unicode_literals. Fixes #153. Fixes build failure with on py32. Bump PKGREVISION.
-rw-r--r--www/py-wtforms/Makefile4
-rw-r--r--www/py-wtforms/distinfo3
-rw-r--r--www/py-wtforms/patches/patch-ext_appengine_fields.py51
3 files changed, 55 insertions, 3 deletions
diff --git a/www/py-wtforms/Makefile b/www/py-wtforms/Makefile
index 4da66314e0f..1ef5f7de8ee 100644
--- a/www/py-wtforms/Makefile
+++ b/www/py-wtforms/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2013/05/08 08:30:47 kleink Exp $
+# $NetBSD: Makefile,v 1.6 2013/09/23 20:36:27 kleink Exp $
DISTNAME= WTForms-1.0.4
PKGNAME= ${PYPKGPREFIX}-${DISTNAME:tl}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= www python
MASTER_SITES= http://pypi.python.org/packages/source/W/WTForms/
EXTRACT_SUFX= .zip
diff --git a/www/py-wtforms/distinfo b/www/py-wtforms/distinfo
index 2eb0443d02b..e28e1c34651 100644
--- a/www/py-wtforms/distinfo
+++ b/www/py-wtforms/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.3 2013/05/07 20:49:33 kleink Exp $
+$NetBSD: distinfo,v 1.4 2013/09/23 20:36:27 kleink Exp $
SHA1 (WTForms-1.0.4.zip) = e8d97b4c72e805b8e29c5d2e6673c40780490c69
RMD160 (WTForms-1.0.4.zip) = 93e853ff39c356bf73c01d37b4a38541d2e3e4fb
Size (WTForms-1.0.4.zip) = 345261 bytes
+SHA1 (patch-ext_appengine_fields.py) = 3f4eef6d763522a93cabc60aeb5691f359297fad
diff --git a/www/py-wtforms/patches/patch-ext_appengine_fields.py b/www/py-wtforms/patches/patch-ext_appengine_fields.py
new file mode 100644
index 00000000000..796e5c460e9
--- /dev/null
+++ b/www/py-wtforms/patches/patch-ext_appengine_fields.py
@@ -0,0 +1,51 @@
+$NetBSD: patch-ext_appengine_fields.py,v 1.1 2013/09/23 20:36:27 kleink Exp $
+
+--- wtforms/ext/appengine/fields.py.orig 2013-05-03 10:40:00.000000000 +0200
++++ wtforms/ext/appengine/fields.py 2013-09-23 22:26:20.000000000 +0200
+@@ -114,7 +114,7 @@
+
+ def __init__(self, label=None, validators=None, reference_class=None,
+ label_attr=None, get_label=None, allow_blank=False,
+- blank_text=u'', **kwargs):
++ blank_text='', **kwargs):
+ super(KeyPropertyField, self).__init__(label, validators,
+ **kwargs)
+ if label_attr is not None:
+@@ -149,7 +149,7 @@
+
+ def iter_choices(self):
+ if self.allow_blank:
+- yield (u'__None', self.blank_text, self.data is None)
++ yield ('__None', self.blank_text, self.data is None)
+
+ for obj in self.query:
+ key = str(obj.key.id())
+@@ -170,9 +170,9 @@
+ if self.data.key == obj.key:
+ break
+ else:
+- raise ValueError(self.gettext(u'Not a valid choice'))
++ raise ValueError(self.gettext('Not a valid choice'))
+ elif not self.allow_blank:
+- raise ValueError(self.gettext(u'Not a valid choice'))
++ raise ValueError(self.gettext('Not a valid choice'))
+
+
+ class StringListPropertyField(fields.TextAreaField):
+@@ -203,14 +203,14 @@
+ if self.raw_data:
+ return self.raw_data[0]
+ else:
+- return self.data and unicode("\n".join(self.data)) or u''
++ return text_type('\n'.join(self.data)) if self.data else ''
+
+ def process_formdata(self, valuelist):
+ if valuelist:
+ try:
+ self.data = [int(value) for value in valuelist[0].splitlines()]
+ except ValueError:
+- raise ValueError(self.gettext(u'Not a valid integer list'))
++ raise ValueError(self.gettext('Not a valid integer list'))
+
+
+ class GeoPtPropertyField(fields.TextField):