Opened 10 years ago

Closed 10 years ago

#965 closed defect (fixed)

Change TextField to StringField in wtforms elements

Reported by: ayleph Owned by:
Priority: trivial Milestone:
Component: programming Keywords: wtforms, deprecation
Cc: Parent Tickets:

Description

The WTFroms TextField alias to StringField has been deprecated. There are numerous TextField entries in various forms (login, register, blog, comments, etc). These cause warnings as such in the log.

/path/to/mediagoblin/lib/python2.7/site-packages/WTForms-2.0.1-py2.7.egg/wtforms/fields/simple.py:23: DeprecationWarning: The TextField alias for StringField has been deprecated and will be removed in WTForms 3.0

From http://wtforms.readthedocs.org/en/latest/whats_new.html :

The TextField alias for StringField is deprecated.

Attachments (1)

0001-wtforms.fields.TextField-was-deprecated.patch (12.7 KB ) - added by gandaro_ 10 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by ayleph, 10 years ago

Status: newreview

I changed all instances of TextField to StringField on my instance it removed the deprecation warnings. Site continues to function the same. Here's a branch from current master with the changes applied.

https://gitorious.org/mediagoblin/aylephs-mediagoblin/commits/4c6fe67ef975aae9a0d7839e347a2756a99c1221

comment:2 by gandaro_, 10 years ago

Here’s a new version of the patch, because the one from ayleph suffered from bit rot. Maybe this time accept the patch in time. ;)

comment:3 by berkerpeksag, 10 years ago

Resolution: fixed
Status: reviewclosed
Note: See TracTickets for help on using tickets.