Opened 11 years ago
Closed 11 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)
Change History (4)
comment:1 by , 11 years ago
| Status: | new → review |
|---|
comment:2 by , 11 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. ;)
by , 11 years ago
| Attachment: | 0001-wtforms.fields.TextField-was-deprecated.patch added |
|---|
comment:3 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | review → closed |
Merged in https://gitorious.org/mediagoblin/mediagoblin/commit/f4686cde1662127b6a443b489f1d9f236060569c
Thanks ayleph and gandaro_!

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