Skip to content

Commit

Permalink
Bump wtforms[email] from 2.3.3 to 3.0.1 (pypi#10520)
Browse files Browse the repository at this point in the history
* Bump wtforms[email] from 2.3.3 to 3.0.1

Bumps [wtforms[email]](https://github.com/wtforms/wtforms) from 2.3.3 to 3.0.1.
- [Release notes](https://github.com/wtforms/wtforms/releases)
- [Changelog](https://github.com/wtforms/wtforms/blob/master/CHANGES.rst)
- [Commits](pallets-eco/wtforms@2.3.3...3.0.1)

---
updated-dependencies:
- dependency-name: wtforms[email]
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update EmailField import

* Update translations

* Update error strings

* Handle None data

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
  • Loading branch information
2 people authored and domdfcoding committed Jun 7, 2022
1 parent 97cd54d commit 3dfd96f
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 31 deletions.
6 changes: 3 additions & 3 deletions requirements/main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1281,9 +1281,9 @@ wrapt==1.13.3 \
--hash=sha256:f9c51d9af9abb899bd34ace878fbec8bf357b3194a10c4e8e0a25512826ef056 \
--hash=sha256:fd76c47f20984b43d93de9a82011bb6e5f8325df6c9ed4d8310029a55fa361ea
# via deprecated
wtforms[email]==2.3.3 \
--hash=sha256:7b504fc724d0d1d4d5d5c114e778ec88c37ea53144683e084215eed5155ada4c \
--hash=sha256:81195de0ac94fbc8368abbaf9197b88c4f3ffd6c2719b5bf5fc9da744f3d829c
wtforms[email]==3.0.1 \
--hash=sha256:6b351bbb12dd58af57ffef05bc78425d08d1914e0fd68ee14143b7ade023c5bc \
--hash=sha256:837f2f0e0ca79481b92884962b914eba4e72b7a2daaf1f939c890ed0124b834b
# via -r requirements/main.in
yara-python==4.1.3 \
--hash=sha256:0dde7a7458dd519e49c3c64a46dc3d1b4f614d27455f2669d4e113ff02ba6c66 \
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/manage/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def test_validate_username_with_user(self):
("value", "expected"),
[
("", "Select role"),
("invalid", "Not a valid choice"),
(None, "Not a valid choice"),
("invalid", "Not a valid choice."),
(None, "Not a valid choice."),
],
)
def test_validate_role_name_fails(self, value, expected):
Expand Down
3 changes: 1 addition & 2 deletions warehouse/accounts/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import markupsafe
import wtforms
import wtforms.fields
import wtforms.fields.html5

import warehouse.utils.webauthn as webauthn

Expand Down Expand Up @@ -193,7 +192,7 @@ def validate_new_password(self, field):

class NewEmailMixin:

email = wtforms.fields.html5.EmailField(
email = wtforms.fields.EmailField(
validators=[
wtforms.validators.DataRequired(),
wtforms.validators.Regexp(
Expand Down
6 changes: 2 additions & 4 deletions warehouse/admin/views/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import shlex

import wtforms
import wtforms.fields.html5
import wtforms.fields
import wtforms.validators

from paginate_sqlalchemy import SqlalchemyOrmPage as SQLAlchemyORMPage
Expand Down Expand Up @@ -73,9 +73,7 @@ def user_list(request):

class EmailForm(forms.Form):

email = wtforms.fields.html5.EmailField(
validators=[wtforms.validators.DataRequired()]
)
email = wtforms.fields.EmailField(validators=[wtforms.validators.DataRequired()])
primary = wtforms.fields.BooleanField()
verified = wtforms.fields.BooleanField()
public = wtforms.fields.BooleanField()
Expand Down
4 changes: 2 additions & 2 deletions warehouse/forklift/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,8 +873,8 @@ def file_upload(request):
"{value!r} is an invalid value for {field}. ".format(
value=(
field.data[:30] + "..." + field.data[-30:]
if len(field.data) > 60
else field.data
if field.data and len(field.data) > 60
else field.data or ""
),
field=field.description,
)
Expand Down
36 changes: 18 additions & 18 deletions warehouse/locale/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -12,84 +12,84 @@ msgstr ""
msgid "Session invalidated by password change"
msgstr ""

#: warehouse/accounts/forms.py:51
#: warehouse/accounts/forms.py:50
msgid "No user found with that username"
msgstr ""

#: warehouse/accounts/forms.py:62
#: warehouse/accounts/forms.py:61
msgid "TOTP code must be ${totp_length} digits."
msgstr ""

#: warehouse/accounts/forms.py:89
#: warehouse/accounts/forms.py:88
msgid "Choose a username with 50 characters or less."
msgstr ""

#: warehouse/accounts/forms.py:95
#: warehouse/accounts/forms.py:94
msgid ""
"The username is invalid. Usernames must be composed of letters, numbers, "
"dots, hyphens and underscores. And must also start and finish with a "
"letter or number. Choose a different username."
msgstr ""

#: warehouse/accounts/forms.py:109
#: warehouse/accounts/forms.py:108
msgid ""
"This username is already being used by another account. Choose a "
"different username."
msgstr ""

#: warehouse/accounts/forms.py:143
#: warehouse/accounts/forms.py:142
msgid "The password is invalid. Try again."
msgstr ""

#: warehouse/accounts/forms.py:147 warehouse/accounts/views.py:79
#: warehouse/accounts/forms.py:146 warehouse/accounts/views.py:79
msgid "There have been too many unsuccessful login attempts. Try again later."
msgstr ""

#: warehouse/accounts/forms.py:169
#: warehouse/accounts/forms.py:168
msgid "Your passwords don't match. Try again."
msgstr ""

#: warehouse/accounts/forms.py:200 warehouse/accounts/forms.py:211
#: warehouse/accounts/forms.py:199 warehouse/accounts/forms.py:210
msgid "The email address isn't valid. Try again."
msgstr ""

#: warehouse/accounts/forms.py:219
#: warehouse/accounts/forms.py:218
msgid "You can't use an email address from this domain. Use a different email."
msgstr ""

#: warehouse/accounts/forms.py:230
#: warehouse/accounts/forms.py:229
msgid ""
"This email address is already being used by this account. Use a different"
" email."
msgstr ""

#: warehouse/accounts/forms.py:237
#: warehouse/accounts/forms.py:236
msgid ""
"This email address is already being used by another account. Use a "
"different email."
msgstr ""

#: warehouse/accounts/forms.py:259 warehouse/manage/forms.py:73
#: warehouse/accounts/forms.py:258 warehouse/manage/forms.py:73
msgid "The name is too long. Choose a name with 100 characters or less."
msgstr ""

#: warehouse/accounts/forms.py:328
#: warehouse/accounts/forms.py:327
msgid "Invalid TOTP code."
msgstr ""

#: warehouse/accounts/forms.py:345
#: warehouse/accounts/forms.py:344
msgid "Invalid WebAuthn assertion: Bad payload"
msgstr ""

#: warehouse/accounts/forms.py:403
#: warehouse/accounts/forms.py:402
msgid "Invalid recovery code."
msgstr ""

#: warehouse/accounts/forms.py:411
#: warehouse/accounts/forms.py:410
msgid "Recovery code has been previously used."
msgstr ""

#: warehouse/accounts/forms.py:430
#: warehouse/accounts/forms.py:429
msgid "No user found with that username or email"
msgstr ""

Expand Down

0 comments on commit 3dfd96f

Please sign in to comment.