From c1226619187d5f66070c90d2dfc620b6e6e5b046 Mon Sep 17 00:00:00 2001 From: SaJH Date: Thu, 2 May 2024 16:46:36 +0900 Subject: [PATCH 1/2] 5.0: Update django.contrib.auth.base_user --- django-stubs/contrib/auth/base_user.pyi | 2 ++ scripts/stubtest/allowlist_todo.txt | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/django-stubs/contrib/auth/base_user.pyi b/django-stubs/contrib/auth/base_user.pyi index 5d36c30c..7e900b61 100644 --- a/django-stubs/contrib/auth/base_user.pyi +++ b/django-stubs/contrib/auth/base_user.pyi @@ -32,6 +32,8 @@ class AbstractBaseUser(models.Model): def set_unusable_password(self) -> None: ... def has_usable_password(self) -> bool: ... def get_session_auth_hash(self) -> str: ... + def get_session_auth_fallback_hash(self) -> str: ... + def _get_session_auth_hash(self, secret: str | bytes | None = ...) -> str: ... @classmethod def get_email_field_name(cls) -> str: ... @classmethod diff --git a/scripts/stubtest/allowlist_todo.txt b/scripts/stubtest/allowlist_todo.txt index 4e475d81..839fcc3a 100644 --- a/scripts/stubtest/allowlist_todo.txt +++ b/scripts/stubtest/allowlist_todo.txt @@ -81,7 +81,6 @@ django.contrib.auth.admin.UserAdmin.form django.contrib.auth.admin.UserAdmin.get_form django.contrib.auth.backends.RemoteUserBackend.authenticate django.contrib.auth.backends.RemoteUserBackend.configure_user -django.contrib.auth.base_user.AbstractBaseUser.get_session_auth_fallback_hash django.contrib.auth.base_user.AbstractBaseUser.last_login django.contrib.auth.base_user.AbstractBaseUser.password django.contrib.auth.decorators.login_required @@ -99,7 +98,6 @@ django.contrib.auth.hashers.reset_hashers django.contrib.auth.management.commands.createsuperuser.Command.get_input_data django.contrib.auth.management.commands.createsuperuser.Command.username_is_unique django.contrib.auth.management.commands.createsuperuser.PASSWORD_FIELD -django.contrib.auth.models.AbstractBaseUser.get_session_auth_fallback_hash django.contrib.auth.models.AbstractBaseUser.last_login django.contrib.auth.models.AbstractBaseUser.password django.contrib.auth.models.AbstractUser.date_joined From d0b9d026b6efc5ef025450de41a482edae0be40d Mon Sep 17 00:00:00 2001 From: SaJH Date: Thu, 2 May 2024 16:54:31 +0900 Subject: [PATCH 2/2] Remove protected method from stubs --- django-stubs/contrib/auth/base_user.pyi | 1 - 1 file changed, 1 deletion(-) diff --git a/django-stubs/contrib/auth/base_user.pyi b/django-stubs/contrib/auth/base_user.pyi index 7e900b61..4740dd50 100644 --- a/django-stubs/contrib/auth/base_user.pyi +++ b/django-stubs/contrib/auth/base_user.pyi @@ -33,7 +33,6 @@ class AbstractBaseUser(models.Model): def has_usable_password(self) -> bool: ... def get_session_auth_hash(self) -> str: ... def get_session_auth_fallback_hash(self) -> str: ... - def _get_session_auth_hash(self, secret: str | bytes | None = ...) -> str: ... @classmethod def get_email_field_name(cls) -> str: ... @classmethod