forked from jsonn/pkgsrc
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add upstream commit 723c40a8153d20dce0c6dd1a91f193ef0375a194 via patch:
Update ext.appengine.fields for unicode_literals. Fixes #153. Fixes build failure with on py32. Bump PKGREVISION.
- Loading branch information
kleink
committed
Sep 23, 2013
1 parent
86196f7
commit 8ddd3d0
Showing
3 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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): |