pypi / wtforms
wtforms
What changed in wtforms 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-25.
2 breaking1 deprecations10 new APIs and options1 performance6 behavior and defaults13 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initwtforms 333 changes
Breaking changes 2
Render-time checked kwargs take precedence over field.checked.
Radio labels no longer render a for attribute.
Deprecations 1
DateTimeField is deprecated.
New APIs and options 10
ButtonField is implemented.
Datalist is implemented.
A DateRange validator, similar to NumberRange, is implemented.
DateTimeLocalField accepts a tz parameter.
The Email validator supports test_environment.
Error messages can be customized.
The formdata parameter is passed to post_process.
RangeInput implements min and max parameters.
The Regexp validator allows customization of its match method.
SelectField supports Enum choices, with improved enum coercion and backward compatibility.
Performance 1
URL validation is faster on hostnames with many dashes.
Behavior and default changes 6
Choices callables are resolved lazily.
FloatField uses NumberInput by default.
html_params returns Markup.
ListField uses Meta.bind_field instead of the default bind method.
The URL validator accepts user/password and uses urllib.urlparse.
The UUID validator accepts uuid.UUID objects.
Fixes and other changes 13
FieldList keeps the form prefix when renumbering its entries.
Choice and SelectChoice dataclasses are re-introduced.
The Email validator respects email_validator default values.
post_process is appended on new FieldList items.
FieldList resets index state when process is called, handles entries with indices, and uses consecutive IDs after insert and remove.
Double quotes in HTML attribute values are escaped.
Numeric fields handle TypeError.
WTForms supports Python 3.15.
The Regexp validator sets the HTML input pattern attribute.
render_kw is copied for each form instance.
False values are handled correctly with Select.
Supports Python versions from 3.10 to 3.14.
Fixes validation being disabled when formdata is provided.