Changelog History
Page 1
-
v3.0.2 Changes
🚀 Unreleased
- Delayed import of
email_validator
. :issue:727
- Delayed import of
-
v3.0.1 Changes
🚀 Released 2021-12-23
- 🛠 Fixed :class:
~fields.DateTimeField
and other similar fields can handle multiple formats. :issue:720
:pr:721
- 👍 Stop support for python 3.6 :pr:
722
- 🛠 Fixed :class:
-
v3.0 Changes
🚀 Unreleased
- HTML is escaped using MarkupSafe instead of the previous internal
implementation. :func:
~widgets.core.escape_html
is removed, replaced by :func:markupsafe.escape
. :class:~widgets.core.HTMLString
is removed, replaced by :class:markupsafe.Markup
. (#400
_) -
aria_
args are rendered the same way asdata_
args, by converting underscores to hyphens.aria_describedby="name-help"
becomesaria-describedby="name-help"
. (#239
,#389
) - HTML5 :class:
~fields.html5.IntegerField
and :class:~fields.html5.RangeInput
don't render thestep="1"
attribute by default. (#343
_) - The :class:
~widgets.TextArea
widget prepends a\r\n
newline when rendering to account for browsers stripping an initial line for display. This does not affect the value. (#238
,#395
) - :class:
~fields.core.Label
text is escaped before rendering. (#315
,#375
) - :class:
~fields.StringField
setsdata
toNone
when form data is empty and an initial value was not provided. Although it previously set an empty string,None
is consistent with the behavior of other fields. (#355
_) - :class:
~fields.SelectField
no longer coercesNone
to"None"
allowing use of"None"
as an option (#288
,#289
) - :class:
~validators.Length
gives a more helpful error message whenmin
andmax
are the same value (#266
_) - 📚 Added more documentation on HTML5 fields and corrected related tests
(
#326
,#409
) - Added a
check_validators
method to :class:~fields.Field
which checks if the given validators are both callable, and not classes (#298
,#410
) - 📦 Fixed broken IPv6 validator, validation now uses the
ipaddress
package (#385
,#403
) -
FieldList
error list is keeps entries in orders for easier identifcation of erroring fields (#257
,#407
) - Converted certain tests to use PyTest style (
#413
,#422
) - Black is now used for code formatting (
#399
,#415
) - 🛠 Fixed :class:
~validators.IPAddress
docstring typo and conformed line lengths to PEP8 (#418
_) - ✅ Fixed some small formatting issues in tests (
#420
_) - Enabled Flake8 (
#416
,#423
) - Moved WTForms to the
src
directory (#397
,#424
) - Specified version of Babel required for setup to avoid errors (
#430
_) - ⚡️ Updated Ukrainian translation (
#433
_) - Email validation is now handled by an optional library,
email_validator
(#429
_) - 🌐 Fixed broken format string in Arabic translation (
#471
_) - Replaced usage of
getattr
/setattr
with constant attributes with regular variable accesses (#482
,#484
) - 📄 Updated
false_values
param inBooleanField
docs (#483
,#485
) - Added a parameter to :class:
~fields.SelectField
to skip choice validation (#434
,#493
) - Permitted underscores in
HostnameValidation
(#463
_) - Modified the changes made in
#286
: instead of copying the list ofchoices
, :class:~fields.SelectField
now useslist()
to construct a new list of choices. (#475
)
.. _#238: https://github.com/wtforms/wtforms/issues/238 .. _#239: https://github.com/wtforms/wtforms/issues/239 .. _#257: https://github.com/wtforms/wtforms/issues/257 .. _#266: https://github.com/wtforms/wtforms/pull/266 .. _#288: https://github.com/wtforms/wtforms/pull/288 .. _#289: https://github.com/wtforms/wtforms/issues/289 .. _#298: https://github.com/wtforms/wtforms/pull/298 .. _#315: https://github.com/wtforms/wtforms/pull/315 .. _#326: https://github.com/wtforms/wtforms/pull/326 .. _#343: https://github.com/wtforms/wtforms/pull/343 .. _#355: https://github.com/wtforms/wtforms/pull/355 .. _#375: https://github.com/wtforms/wtforms/pull/375 .. _#385: https://github.com/wtforms/wtforms/issues/385 .. _#389: https://github.com/wtforms/wtforms/pull/389 .. _#395: https://github.com/wtforms/wtforms/pull/395 .. _#397: https://github.com/wtforms/wtforms/issues/397 .. _#399: https://github.com/wtforms/wtforms/issues/399 .. _#400: https://github.com/wtforms/wtforms/pull/400 .. _#403: https://github.com/wtforms/wtforms/pull/403 .. _#407: https://github.com/wtforms/wtforms/pull/407 .. _#409: https://github.com/wtforms/wtforms/pull/409 .. _#410: https://github.com/wtforms/wtforms/pull/410 .. _#413: https://github.com/wtforms/wtforms/pull/413 .. _#415: https://github.com/wtforms/wtforms/pull/415 .. _#416: https://github.com/wtforms/wtforms/issues/416 .. _#418: https://github.com/wtforms/wtforms/pull/418 .. _#420: https://github.com/wtforms/wtforms/pull/420 .. _#422: https://github.com/wtforms/wtforms/pull/422 .. _#423: https://github.com/wtforms/wtforms/pull/423 .. _#424: https://github.com/wtforms/wtforms/pull/424 .. _#429: https://github.com/wtforms/wtforms/pull/429 .. _#430: https://github.com/wtforms/wtforms/pull/430 .. _#433: https://github.com/wtforms/wtforms/pull/433 .. _#434: https://github.com/wtforms/wtforms/issues/434 .. _#463: https://github.com/wtforms/wtforms/pull/463 .. _#471: https://github.com/wtforms/wtforms/pull/471 .. _#475: https://github.com/wtforms/wtforms/pull/475/ .. _#482: https://github.com/wtforms/wtforms/issues/482 .. _#483: https://github.com/wtforms/wtforms/issues/483 .. _#484: https://github.com/wtforms/wtforms/pull/484 .. _#485: https://github.com/wtforms/wtforms/pull/485 .. _#493: https://github.com/wtforms/wtforms/pull/493
- HTML is escaped using MarkupSafe instead of the previous internal
implementation. :func:
-
v3.0.0.a1 Changes
November 23, 2020- ⬇️ Drop support for Python < 3.6. #554
fields.StringField
sets data to None when form data is empty and an initial value was not provided. Although it previously set an empty string, None is consistent with the behavior of other fields. #355- Specified version of Babel required for setup to avoid errors. #430
- Replaced use of getattr/setattr with regular variable access. #482
ValueError
raised by a validator are handled like regular exceptions. Validators need to raisevalidators.ValidationError
orvalidators.StopValidation
to make a validation fail. #445fields.SelectField
,fields.SelectMultipleField
andfields.RadioField
choices parameter can be a callable. #608- Choices shortcut for
fields.core.SelectMultipleField
. #603 #605 - Forms can have form-level errors. #55 #595
- Implemented
fields.core.MonthField
. #530 #593 - Filters can be inline.
form.BaseForm.process
takes a extra_filters parameter. #128 #592 - Fields can be passed the name argument to use a HTML name different than their Python name. #205, #601
- Render attribute names like for_ and class_ are normalized consistently so later values override those specified earlier. #449, #596
- Flags can take non-boolean values. #406 #467
- 0️⃣ Widgets are HTML5 by default. #594 #614
- 🛠 Fixed a bug when the
fields.core.SelectField
choices are list of strings. #598 - Error messages standardization. #613 #620 #626 #627
- 🛠
fields.core.SelectMultipleField
validate_choice bugfix. #606 #642 - 🛠 Fixed SelectMultipleField validation when using choices list shortcut. #612 #661
-
v2.3.3 Changes
July 30, 2020🚀 Released 2020-07-30
- 🚀 This release includes the translation files that were missing in the
2.3.2 release. :issue:
641
- 🚀 This release includes the translation files that were missing in the
2.3.2 release. :issue:
-
v2.3.2 Changes
July 30, 2020 -
v2.3.1 Changes
April 22, 2020🚀 Released 2020-04-22
- 🗄 All modules in
wtforms.ext
show a deprecation warning on import. They will be removed in version 3.0. - 🛠 Fixed a bug when :class:
~fields.SelectField
choices isNone
. :issue:572, 585
- ⏪ Restored
HTMLString
andescape_html
as aliases for MarkupSafe functions. Their use shows aDeprecationWarning
. :issue:581
, :pr:583
-
Form.validate
takes anextra_validators
parameter, mapping field names to lists of extra validator functions. This matchesBaseForm.validate
. :pr:584
- ⚡️ Update locale catalogs.
- 🗄 All modules in
-
v2.3.0 Changes
April 21, 2020🚀 Released 2020-04-21
- 👍 Drop support for Python 2.6, 3.3, and 3.4.
- :class:
~fields.SelectField
useslist()
to construct a new list of choices. :pr:475
- Permitted underscores in
HostnameValidation
. :pr:463
- :class:
~validators.URL
validator now allows query parameters in the URL. :issue:523
, :pr:524
- ⚡️ Updated
false_values
param inBooleanField
docs. :issue:483
, :pr:485
- 🌐 Fixed broken format string in Arabic translation :pr:
471
- ⚡️ Updated French and Japanese translations. :pr:
506, 514
- ⚡️ Updated Ukrainian translation. :pr:
433
-
FieldList
error list keeps entries in order for easier identification of which fields had errors. :issue:257
, :pr:407
- :class:
~validators.Length
gives a more helpful error message whenmin
andmax
are the same value. :pr:266
- :class:
~fields.SelectField
no longer coercesNone
to"None"
allowing use of"None"
as an option. :issue:289
, :pr:288
- The :class:
~widgets.TextArea
widget prepends a\r\n
newline when rendering to account for browsers stripping an initial line for display. This does not affect the value. :issue:238
, :pr:395
- HTML5 :class:
~fields.html5.IntegerField
and :class:~fields.html5.RangeInput
don't render thestep="1"
attribute by default. :pr:343
-
aria_
args are rendered the same way asdata_
args, by converting underscores to hyphens.aria_describedby="name-help"
becomesaria-describedby="name-help"
. :issue:239
, :pr:389
- Added a
check_validators
method to :class:~fields.Field
which checks if the given validators are both callable, and not classes. :pr:298, 410
- ⚡️
form.errors
is not cached and will update if an error is appended to a field after access. :pr:568
- :class:
~wtforms.validators.NumberRange
correctly handle NaN values. :issue:505
, :pr:548
- :class:
~fields.IntegerField
checks input type when processing data. :pr:451
- Added a parameter to :class:
~fields.SelectField
to skip choice validation. :issue:434
, :pr:493
- Choices which name and data are the same do not need to use tuples.
:pr:
526
- 📚 Added more documentation on HTML5 fields. :pr:
326, 409
- HTML is escaped using MarkupSafe instead of the previous internal
implementation. :func:
~widgets.core.escape_html
is removed, replaced by :func:markupsafe.escape
. :class:~widgets.core.HTMLString
is removed, replaced by :class:markupsafe.Markup
. :pr:400
- 🛠 Fixed broken IPv6 validator, validation now uses the
ipaddress
package. :issue:385
, :pr:403
- :class:
~fields.core.Label
text is escaped before rendering. :issue:315
, :pr:375
- Email validation is now handled by an optional library,
email_validator
. :pr:429
-
v2.2.1 Changes
June 07, 2018🚀 Released on June 7th, 2018
- :class:
~fields.StringField
only setsdata = ''
when form data is empty and an initial value was not provided. This fixes an issue where the default value wasn't rendered with the initial form. (#291
,#401
)
.. _#291: https://github.com/wtforms/wtforms/issues/291 .. _#401: https://github.com/wtforms/wtforms/issues/401
- :class:
-
v2.2 Changes
June 02, 2018🚀 Released on June 2nd, 2018
- ⚡️ Merged new and updated translations from the community.
- Passing
data_
args to render a field converts all the underscores to hyphens when rendering the HTML attribute, not just the first one.data_foo_bar
becomesdata-foo-bar
. (#248
_) - The :class:
~validators.UUID
validator uses the :class:uuid.UUID
class instead of a regex. (#251
_) - :class:
~fields.SelectField
copies the list ofchoices
passed to it so modifying an instance's choices will not modify the global form definition. (#286
_) - Fields call :meth:
~fields.Field.process_formdata
even if the raw data is empty. (#280
_) - Added a :class:
~fields.MultipleFileField
to handle a multi-file input. :class:~fields.FileField
continues to handle only one value. The underlying :class:~widgets.FileInput
widget gained amultiple
argument. (#281
_) - :class:
~fields.SelectField
choices can contain HTML (MarkupSafeMarkup
object or equivalent API) and will be rendered properly. (#302
_) - :class:
~fields.TimeField
and :class:html5.TimeField <fields.html5.TimeField>
were added. (#254
_) - Improved :class:
~validators.Email
. Note that it is still unreasonable to validate all emails with a regex and you should prefer validating by actually sending an email. (#294
_) - Widgets render the
required
attribute when using a validator that provides the'required'
flag, such as :class:~validators.DataRequired
. (#361
_) - Fix a compatibility issue with SQLAlchemy 2.1 that caused
:class:
~ext.sqlalchemy.fields.QuerySelectField
to fail withValueError: too many values to unpack
. (#391
_)
.. _#248: https://github.com/wtforms/wtforms/pull/248 .. _#251: https://github.com/wtforms/wtforms/pull/251 .. _#254: https://github.com/wtforms/wtforms/pull/254 .. _#280: https://github.com/wtforms/wtforms/pull/280 .. _#281: https://github.com/wtforms/wtforms/pull/281 .. _#286: https://github.com/wtforms/wtforms/pull/286 .. _#294: https://github.com/wtforms/wtforms/pull/294 .. _#302: https://github.com/wtforms/wtforms/pull/302 .. _#361: https://github.com/wtforms/wtforms/pull/361 .. _#391: https://github.com/wtforms/wtforms/pull/391