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
1 change: 1 addition & 0 deletions django-stubs/core/exceptions.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class AppRegistryNotReady(Exception): ...
class ObjectDoesNotExist(Exception):
silent_variable_failure: bool

class ObjectNotUpdated(Exception): ...
class MultipleObjectsReturned(Exception): ...
class SuspiciousOperation(Exception): ...
class SuspiciousMultipartForm(SuspiciousOperation): ...
Expand Down
3 changes: 2 additions & 1 deletion django-stubs/db/models/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ from typing import Any, ClassVar, Final, TypeVar, overload

from django.core.checks.messages import CheckMessage
from django.core.exceptions import MultipleObjectsReturned as BaseMultipleObjectsReturned
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.core.exceptions import ObjectDoesNotExist, ObjectNotUpdated, ValidationError
from django.db.models import BaseConstraint, Field, QuerySet
from django.db.models.manager import Manager
from django.db.models.options import Options
Expand Down Expand Up @@ -40,6 +40,7 @@ class Model(metaclass=ModelBase):
# and re-add them to correct concrete subclasses of 'Model'
DoesNotExist: Final[type[ObjectDoesNotExist]]
MultipleObjectsReturned: Final[type[BaseMultipleObjectsReturned]]
NotUpdated: Final[type[ObjectNotUpdated]]
# This 'objects' attribute will be deleted, via the plugin, in favor of managing it
# to only exist on subclasses it exists on during runtime.
objects: ClassVar[Manager[Self]]
Expand Down
17 changes: 0 additions & 17 deletions scripts/stubtest/allowlist_todo_django60.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ django.conf.global_settings.TASKS
django.conf.global_settings.URLIZE_ASSUME_HTTPS
django.contrib.admin.AdminSite.password_change_form
django.contrib.admin.ModelAdmin.log_deletion
django.contrib.admin.models.LogEntry.NotUpdated
django.contrib.admin.models.LogEntryManager.log_action
django.contrib.admin.options.BaseModelAdmin.lookup_allowed
django.contrib.admin.options.ModelAdmin.log_deletion
Expand All @@ -22,26 +21,15 @@ django.contrib.auth.checks.check_user_model
django.contrib.auth.forms.SetPasswordMixin.__class_getitem__
django.contrib.auth.management.RenamePermission
django.contrib.auth.management.rename_permissions
django.contrib.auth.models.Group.NotUpdated
django.contrib.auth.models.Permission.NotUpdated
django.contrib.auth.models.User.NotUpdated
django.contrib.auth.templatetags
django.contrib.auth.templatetags.auth
django.contrib.contenttypes.checks.check_generic_foreign_keys
django.contrib.contenttypes.checks.check_model_name_lengths
django.contrib.contenttypes.fields.GenericForeignKey.ct_field_attname
django.contrib.contenttypes.fields.GenericForeignKey.get_prefetch_queryset
django.contrib.contenttypes.management.get_contenttypes_and_models
django.contrib.contenttypes.models.ContentType.NotUpdated
django.contrib.flatpages.models.FlatPage.NotUpdated
django.contrib.gis.admin.AdminSite.password_change_form
django.contrib.gis.admin.ModelAdmin.log_deletion
django.contrib.gis.db.backends.oracle.models.OracleGeometryColumns.NotUpdated
django.contrib.gis.db.backends.oracle.models.OracleSpatialRefSys.NotUpdated
django.contrib.gis.db.backends.postgis.models.PostGISGeometryColumns.NotUpdated
django.contrib.gis.db.backends.postgis.models.PostGISSpatialRefSys.NotUpdated
django.contrib.gis.db.backends.spatialite.models.SpatialiteGeometryColumns.NotUpdated
django.contrib.gis.db.backends.spatialite.models.SpatialiteSpatialRefSys.NotUpdated
django.contrib.gis.db.models.Aggregate.allow_order_by
django.contrib.gis.db.models.AnyValue
django.contrib.gis.db.models.BaseConstraint.__init__
Expand Down Expand Up @@ -100,16 +88,12 @@ django.contrib.postgres.search.psql_escape
django.contrib.postgres.search.quote_lexeme
django.contrib.postgres.search.spec_chars_re
django.contrib.postgres.utils.CheckPostgresInstalledMixin
django.contrib.redirects.models.Redirect.NotUpdated
django.contrib.sessions.models.Session.NotUpdated
django.contrib.sites.models.Site.NotUpdated
django.contrib.staticfiles.checks.check_finders
django.contrib.staticfiles.checks.check_storages
django.core.checks.model_checks.check_all_models
django.core.checks.model_checks.check_lazy_references
django.core.checks.security.base.E026
django.core.checks.security.base.check_csp_settings
django.core.exceptions.ObjectNotUpdated
django.core.mail.EmailMessage.__init__
django.core.mail.EmailMessage.message
django.core.mail.EmailMultiAlternatives.__init__
Expand Down Expand Up @@ -178,7 +162,6 @@ django.db.migrations.executor.MigrationExecutor.record_migration
django.db.migrations.loader.MigrationLoader.all_replaced_applied
django.db.migrations.loader.MigrationLoader.replace_migration
django.db.migrations.operations.base.Operation.__replace__
django.db.migrations.recorder.MigrationRecorder.Migration.NotUpdated
django.db.migrations.serializer.DeconstructableSerializer
django.db.migrations.serializer.DeconstructibleSerializer
django.db.migrations.serializer.ZoneInfoSerializer
Expand Down
Loading