requirements: Upgrade Python requirements.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2025-05-04 23:19:41 -07:00
committed by Tim Abbott
parent 7566e6549e
commit acd7353538
13 changed files with 2361 additions and 2260 deletions

View File

@@ -2,7 +2,7 @@ import base64
import logging
import re
from email.headerregistry import Address
from typing import Any
from typing import TYPE_CHECKING, Any, TypeAlias
import dns.resolver
import orjson
@@ -426,7 +426,16 @@ class CaptchaRealmCreationForm(RealmCreationForm):
return payload
class LoggingSetPasswordForm(SetPasswordForm):
# https://github.com/typeddjango/django-stubs/pull/2384#pullrequestreview-2813849209
if TYPE_CHECKING:
BaseSetPasswordForm: TypeAlias = SetPasswordForm[UserProfile] # type: ignore[type-var] # we don't subclass AbstractUser
else:
BaseSetPasswordForm = SetPasswordForm
class LoggingSetPasswordForm(
BaseSetPasswordForm # type: ignore[type-var] # we don't subclass AbstractUser
):
new_password1 = forms.CharField(
label=_("New password"),
widget=forms.PasswordInput(attrs={"autocomplete": "new-password"}),
@@ -452,7 +461,6 @@ class LoggingSetPasswordForm(SetPasswordForm):
@override
def save(self, commit: bool = True) -> UserProfile:
assert isinstance(self.user, UserProfile)
do_change_password(self.user, self.cleaned_data["new_password1"], commit=commit)
return self.user