# This is a true allow list with things that we really don't care about.
# `allowlist_todo.txt` and `allowlist_todo_django50`
# are autogenerated by `stubtest --generate-allowlist`
# and might contain actual problems and things that we *do want* to fix.
#
# Please, move things here when you are sure that they really should be ignored.
# Comments about why things are ignored are mandatory.

# We don't need locales:
django.conf.locale.*

# We don't need migrations:
django.contrib.admin.migrations.*
django.contrib.auth.migrations.*
django.contrib.contenttypes.migrations.*
django.contrib.flatpages.migrations.*
django.contrib.redirects.migrations.*
django.contrib.sessions.migrations.*
django.contrib.sites.migrations.*

# default_storage is actually an instance of DefaultStorage, but it proxies through to a Storage
django.core.files.storage.default_storage

# '<Model>_RelatedManager' entries are plugin generated and these subclasses only exist
# _locally/dynamically_ runtime -- Created via
# 'django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager'
django.contrib.admin.models.LogEntry_RelatedManager
django.contrib.auth.models.Permission_RelatedManager

# '<Model>_ManyRelatedManager' entries are plugin generated and these subclasses only exist
# _locally/dynamically_ runtime -- Created via
# 'django.db.models.fields.related_descriptors.create_forward_many_to_many_manager'
django.contrib.auth.models.Group_ManyRelatedManager
django.contrib.auth.models.Permission_ManyRelatedManager
django.contrib.auth.models.User_ManyRelatedManager

# BaseArchive abstract methods that take no argument, but typed with arguments to match the Archive and TarArchive Implementations
django.utils.archive.BaseArchive.list
django.utils.archive.BaseArchive.extract

# ImmutableList always raise when calling these,
# later they can be added with `-> NoReturn` overrides.
django.utils.datastructures.ImmutableList.__delitem__
django.utils.datastructures.ImmutableList.__delslice__
django.utils.datastructures.ImmutableList.__iadd__
django.utils.datastructures.ImmutableList.__imul__
django.utils.datastructures.ImmutableList.__setitem__
django.utils.datastructures.ImmutableList.__setslice__
django.utils.datastructures.ImmutableList.append
django.utils.datastructures.ImmutableList.extend
django.utils.datastructures.ImmutableList.insert
django.utils.datastructures.ImmutableList.pop
django.utils.datastructures.ImmutableList.remove
django.utils.datastructures.ImmutableList.sort
django.utils.datastructures.ImmutableList.reverse

# Promise is lazy, see notes in .pyi
django.utils.functional.Promise.__init__
django.utils.functional.Promise.__add__
django.utils.functional.Promise.__deepcopy__
django.utils.functional.Promise.__radd__
django.utils.functional.Promise.__mod__

# `classonlymethod` is an alias for `@classmethod` which is disjoint:
django.utils.decorators.classonlymethod

# Lazy regex
django.contrib.admin.utils.UNQUOTE_RE
django.contrib.gis.geometry.hex_regex
django.contrib.gis.geometry.json_regex
django.contrib.gis.geometry.wkt_regex
django.contrib.gis.geos.hex_regex
django.contrib.gis.geos.wkt_regex
django.core.cache.backends.base.memcached_error_chars_re
django.core.validators.EmailValidator.domain_regex
django.core.validators.EmailValidator.literal_regex
django.core.validators.EmailValidator.user_regex
django.core.validators.slug_re
django.core.validators.slug_unicode_re
django.core.validators.URLValidator.regex
django.core.management.commands.makemessages.plural_forms_re
django.core.management.commands.runserver.naiveip_re
django.http.request.host_validation_re
django.middleware.csrf.invalid_token_chars_re
django.template.base.filter_re
django.template.base.kwarg_re
django.test.client.CONTENT_TYPE_RE
django.test.client.JSON_CONTENT_TYPE_RE
django.test.html.ASCII_WHITESPACE
django.utils.dateformat.re_escaped
django.utils.dateformat.re_formatchars
django.utils.dateparse.date_re
django.utils.dateparse.datetime_re
django.utils.dateparse.iso8601_duration_re
django.utils.dateparse.postgres_interval_re
django.utils.dateparse.standard_duration_re
django.utils.dateparse.time_re
django.utils.http.ASCTIME_DATE
django.utils.http.ETAG_MATCH
django.utils.http.RFC1123_DATE
django.utils.http.RFC850_DATE
django.utils.text.re_newlines
django.utils.text.re_camel_case
django.utils.text.smart_split_re
django.utils.translation.trans_real.language_code_re
django.utils.translation.trans_real.language_code_prefix_re
django.utils.translation.trans_real.accept_language_re
django.utils.translation.template.plural_re
django.utils.translation.template.inline_re
django.utils.translation.template.endblock_re
django.utils.translation.template.dot_re
django.utils.translation.template.context_re
django.utils.translation.template.constant_re
django.utils.translation.template.block_re
django.utils.version.version_component_re
django.views.debug.SafeExceptionReporterFilter.hidden_settings
django.http.multipartparser.MultiPartParser.boundary_re

# AlterTogetherOptionOperation.option_name is set as None,
# but is required in the init, so we type it as str
django.db.migrations.operations.models.AlterTogetherOptionOperation.option_name

# These are set to None in the base class but *must* be overridden
# because they are required in the init, so we type them without the None option.
django.db.backends.base.base.BaseDatabaseWrapper.SchemaEditorClass
django.db.backends.base.base.BaseDatabaseWrapper.client_class
django.db.backends.base.base.BaseDatabaseWrapper.creation_class
django.db.backends.base.base.BaseDatabaseWrapper.features_class
django.db.backends.base.base.BaseDatabaseWrapper.introspection_class
django.db.backends.base.base.BaseDatabaseWrapper.ops
django.db.backends.base.base.BaseDatabaseWrapper.ops_class

# Attributes defaulting to None messing with mypy
django.views.generic.detail.SingleObjectMixin.model
django.views.generic.edit.BaseDeleteView.form_class

# Dynamically added via django.core.management.color.make_style
django.core.management.color.Style.ERROR
django.core.management.color.Style.ERROR_OUTPUT
django.core.management.color.Style.HTTP_BAD_REQUEST
django.core.management.color.Style.HTTP_INFO
django.core.management.color.Style.HTTP_NOT_FOUND
django.core.management.color.Style.HTTP_NOT_MODIFIED
django.core.management.color.Style.HTTP_REDIRECT
django.core.management.color.Style.HTTP_SERVER_ERROR
django.core.management.color.Style.HTTP_SUCCESS
django.core.management.color.Style.MIGRATE_HEADING
django.core.management.color.Style.MIGRATE_LABEL
django.core.management.color.Style.NOTICE
django.core.management.color.Style.SQL_COLTYPE
django.core.management.color.Style.SQL_FIELD
django.core.management.color.Style.SQL_KEYWORD
django.core.management.color.Style.SQL_TABLE
django.core.management.color.Style.SUCCESS
django.core.management.color.Style.WARNING

# We re-export `functools.cached_property` which has different semantics
django.utils.functional.cached_property.__class_getitem__
django.utils.functional.cached_property.__set__
django.utils.functional.cached_property.name

# Ignore missing inner `Meta` class, see PR #2000 for the related discussion
django.contrib.auth.base_user.AbstractBaseUser.Meta
django.contrib.auth.forms.BaseUserCreationForm.Meta
django.contrib.auth.forms.UserChangeForm.Meta
django.contrib.auth.models.AbstractBaseUser.Meta
django.contrib.auth.models.AbstractUser.Meta
django.contrib.auth.models.PermissionsMixin.Meta
django.contrib.flatpages.forms.FlatpageForm.Meta
django.contrib.sessions.base_session.AbstractBaseSession.Meta

# Custom __str__ that we don't want to overcomplicate:
django.forms.utils.RenderableMixin.__str__
django.forms.utils.RenderableMixin.__html__

# Dynamically added in ManyToManyField.contribute_to_class()
django.db.models.ManyToManyField.m2m_db_table
django.db.models.fields.related.ManyToManyField.m2m_db_table
django.contrib.gis.db.models.ManyToManyField.m2m_db_table

# Dynamically added in ManyToManyField.contribute_to_related_class()
django.db.models.ManyToManyField.m2m_column_name
django.db.models.ManyToManyField.m2m_field_name
django.db.models.ManyToManyField.m2m_reverse_field_name
django.db.models.ManyToManyField.m2m_reverse_name
django.db.models.ManyToManyField.m2m_reverse_target_field_name
django.db.models.ManyToManyField.m2m_target_field_name
django.db.models.fields.related.ManyToManyField.m2m_column_name
django.db.models.fields.related.ManyToManyField.m2m_field_name
django.db.models.fields.related.ManyToManyField.m2m_reverse_field_name
django.db.models.fields.related.ManyToManyField.m2m_reverse_name
django.db.models.fields.related.ManyToManyField.m2m_reverse_target_field_name
django.db.models.fields.related.ManyToManyField.m2m_target_field_name
django.contrib.gis.db.models.ManyToManyField.m2m_column_name
django.contrib.gis.db.models.ManyToManyField.m2m_field_name
django.contrib.gis.db.models.ManyToManyField.m2m_reverse_field_name
django.contrib.gis.db.models.ManyToManyField.m2m_reverse_name
django.contrib.gis.db.models.ManyToManyField.m2m_reverse_target_field_name
django.contrib.gis.db.models.ManyToManyField.m2m_target_field_name

# Defined inside a signature (using the walrus operator)
django.core.management.utils.sentinel

# Plugin generated model instances for '.annotate' support
django.contrib.admin.models.LogEntry@AnnotatedWith
django.contrib.auth.base_user.AbstractBaseUser@AnnotatedWith
django.contrib.auth.models.AbstractUser@AnnotatedWith
django.contrib.auth.models.Group@AnnotatedWith
django.contrib.auth.models.Permission@AnnotatedWith
django.contrib.auth.models.PermissionsMixin@AnnotatedWith
django.contrib.auth.models.User@AnnotatedWith
django.contrib.contenttypes.models.ContentType@AnnotatedWith
django.contrib.flatpages.models.FlatPage@AnnotatedWith
django.contrib.gis.db.backends.oracle.models.OracleGeometryColumns@AnnotatedWith
django.contrib.gis.db.backends.oracle.models.OracleSpatialRefSys@AnnotatedWith
django.contrib.gis.db.backends.postgis.models.PostGISGeometryColumns@AnnotatedWith
django.contrib.gis.db.backends.postgis.models.PostGISSpatialRefSys@AnnotatedWith
django.contrib.gis.db.backends.spatialite.models.SpatialiteGeometryColumns@AnnotatedWith
django.contrib.gis.db.backends.spatialite.models.SpatialiteSpatialRefSys@AnnotatedWith
django.contrib.redirects.models.Redirect@AnnotatedWith
django.contrib.sessions.base_session.AbstractBaseSession@AnnotatedWith
django.contrib.sessions.models.Session@AnnotatedWith
django.contrib.sites.models.Site@AnnotatedWith
django.db.migrations.recorder.Migration@AnnotatedWith

# These are `UserModel = get_user_model()` lines, the plugin updates them to correct types
django.contrib.auth.backends.UserModel
django.contrib.auth.forms.UserModel
django.contrib.auth.views.UserModel

# Using the definitions from `dict` (from typeshed)
django.contrib.sessions.backends.base.SessionBase.get
django.contrib.sessions.backends.base.SessionBase.setdefault

# Limited stubtest support for enums (https://github.com/python/mypy/issues/16806)
django.db.migrations.operations.base.OperationCategory.__new__

# Ignore: ...Model.[a]save is inconsistent, stub does not have *args argument "args"
# Positional arguments were deprecated in Django 5.1, we have adopted keyword-only arguments early.
django.contrib.auth.base_user.AbstractBaseUser.save
django.contrib.auth.models.AbstractBaseUser.save
django.contrib.gis.db.models.Model.asave
django.contrib.gis.db.models.Model.save
django.db.models.Model.asave
django.db.models.Model.save
django.db.models.base.Model.asave
django.db.models.base.Model.save

# Ignore: GeneratedField.__init__ is inconsistent, runtime argument "db_persist" has a default value but stub argument does not
# The default value None never worked and has been dropped for Django 6.0:
# https://code.djangoproject.com/ticket/36262
django.contrib.gis.db.models.GeneratedField.__init__
django.db.models.GeneratedField.__init__
django.db.models.fields.generated.GeneratedField.__init__

# These are dynamically added when using `save(commit=False)`
# See https://docs.djangoproject.com/en/5.2/topics/forms/modelforms/#the-save-method
django.forms.BaseModelForm.save_m2m
django.forms.BaseModelFormSet.save_m2m
django.forms.models.BaseModelForm.save_m2m
django.forms.models.BaseModelFormSet.save_m2m
django.contrib.gis.forms.BaseModelForm.save_m2m
django.contrib.gis.forms.BaseModelFormSet.save_m2m

# Dynamically generated in https://github.com/django/django/blob/0ee06c04e0256094270db3ffe8b5dafa6a8457a3/django/core/mail/backends/locmem.py#L24
django.core.mail.outbox

# Variable is supposed to be a set but is initialised to an empty dict
django.contrib.gis.db.backends.base.features.BaseSpatialFeatures.unsupported_geojson_options

# We declare more strict types for this in stubs to avoid RuntimeErrors.
# Django uses a `*args` parameter but crash if it contains more than 1 element.
django.http.QueryDict.pop
django.http.request.QueryDict.pop

# Django incorrectly uses a signature of `(cls, **kwargs)` when it should be `(cls, *args, **kwargs)`.
django.test.selenium.SeleniumTestCase.__init_subclass__

# Django incorrectly uses a signature of `(self, *args, **kwargs)` when it should be `(self)`.
django.forms.renderers.Jinja2DivFormRenderer.__init__

# mypy does not understand __getitem__ unpacking python/mypy#2220
django.urls.ResolverMatch.__iter__
django.urls.resolvers.ResolverMatch.__iter__
