Opened 7 years ago

Closed 7 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.

Subtickets

Attachments (1)

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

Download all attachments as: .zip

Change History (4)

comment:1 Changed 7 years ago by ayleph

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 Changed 7 years ago by gandaro_

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 Changed 7 years ago by berkerpeksag

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