All Versions
28
Latest Version
3.0
Avg Release Cycle
215 days
Latest Release
-

Changelog History
Page 1

  • 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 as data_ args, by converting underscores to hyphens. aria_describedby="name-help" becomes aria-describedby="name-help". (#239, #389)
    • HTML5 :class:~fields.html5.IntegerField and :class:~fields.html5.RangeInput don't render the step="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 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_)
    • :class:~fields.SelectField no longer coerces None to "None" allowing use of "None" as an option (#288, #289)
    • :class:~validators.Length gives a more helpful error message when min and max 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 in BooleanField 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 of choices, :class:~fields.SelectField now uses list() 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

  • 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 raise validators.ValidationError or validators.StopValidation to make a validation fail. #445
    • fields.SelectField, fields.SelectMultipleField and fields.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
  • v2.3.2 Changes

    July 30, 2020

    Changelog:

    • ๐Ÿ›  Fixed a bug with :class:~fields.SelectField choices shortcut at
      form submission. #598 #639
  • 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 is None. :issue:572, 585
    • โช Restored HTMLString and escape_html as aliases for MarkupSafe functions. Their use shows a DeprecationWarning. :issue:581, :pr:583
    • Form.validate takes an extra_validators parameter, mapping field names to lists of extra validator functions. This matches BaseForm.validate. :pr:584
    • โšก๏ธ Update locale catalogs.
  • 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 uses list() 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 in BooleanField 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 when min and max are the same value. :pr:266
    • :class:~fields.SelectField no longer coerces None 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 the step="1" attribute by default. :pr:343
    • aria_ args are rendered the same way as data_ args, by converting underscores to hyphens. aria_describedby="name-help" becomes aria-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 sets data = '' 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

  • 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 becomes data-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 of choices 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 a multiple argument. (#281_)
    • :class:~fields.SelectField choices can contain HTML (MarkupSafe Markup 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 with ValueError: 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

  • v2.1 Changes

    December 15, 2015

    ๐Ÿš€ Released 2015-12-15

    • 0๏ธโƒฃ Added render_kw to allow default rendering time options.
    • โšก๏ธ Updated / added a number of localizations.
    • โšก๏ธ Updated docs.
    • Allow widgets to set flags.
  • v2.0.2 Changes

    January 18, 2015

    ๐Ÿš€ Released 2015-01-18

    • โšก๏ธ Added more localizations and updated some.
    • Validators for email and URL can validate IDNA-encoded domain names and new TLDs.
    • ๐Ÿ—„ Better DeprecationWarnings.
    • ๐Ÿ‘ Support localization files in /usr/share/locale for distro packaging.