Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
fail-fast: false
matrix:
include:
- {python: '3.14'}
- {python: '3.13'}
- {python: '3.12'}
- {python: '3.11'}
- {python: '3.10'}
- {python: '3.9'}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Unreleased
Unreleased

- Fix :class:`~validators.Disabled` validation with provided formdata. :pr:`880`
- End support for Python 3.9, start support for Python 3.14. :pr:`883`

Version 3.2.1
-------------
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ classifiers = [
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
]
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
"MarkupSafe",
]
Expand Down
8 changes: 4 additions & 4 deletions src/wtforms/fields/choices.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ def _choices_generator(self, choices):
if not choices:
_choices = []

elif isinstance(choices[0], (list, tuple)):
elif isinstance(choices[0], list | tuple):
_choices = choices

else:
_choices = zip(choices, choices)
_choices = zip(choices, choices, strict=False)

for value, label, *other_args in _choices:
selected = self.coerce(value) == self.data
Expand Down Expand Up @@ -168,11 +168,11 @@ def _choices_generator(self, choices):
if not choices:
_choices = []

elif isinstance(choices[0], (list, tuple)):
elif isinstance(choices[0], list | tuple):
_choices = choices

else:
_choices = zip(choices, choices)
_choices = zip(choices, choices, strict=False)

for value, label, *other_args in _choices:
selected = self.data is not None and self.coerce(value) in self.data
Expand Down
2 changes: 1 addition & 1 deletion src/wtforms/fields/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def populate_obj(self, obj, name):
candidates = itertools.chain(ivalues, itertools.repeat(None))
_fake = type("_fake", (object,), {})
output = []
for field, data in zip(self.entries, candidates):
for field, data in zip(self.entries, candidates, strict=False):
fake_obj = _fake()
fake_obj.data = data
field.populate_obj(fake_obj, "data")
Expand Down
2 changes: 1 addition & 1 deletion tests/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class DummyPostData(dict):
def getlist(self, key):
v = self[key]
if not isinstance(v, (list, tuple)):
if not isinstance(v, list | tuple):
v = [v]
return v
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
style
py{313,312,311,310,39,py3}
py{314,313,312,311,310,py310}
docs
skip_missing_interpreters = true

Expand Down
Loading