From c7fa68c1b5523cfefb5ff182ef85de7143ea9faf Mon Sep 17 00:00:00 2001 From: Thibaut Decombe Date: Fri, 13 Oct 2023 14:08:21 +0200 Subject: [PATCH 1/5] Fix more cached properties Using this shell and this python script (EXCLUDING `output_field`, will fix in another MR): ```shell rm -rf .mypy_cache/ && stubtest django \ --mypy-config-file mypy.ini \ --ignore-positional-only \ --allowlist scripts/stubtest/allowlist.txt | rg "cannot reconcile @property on stub" -A4 > t.txt && cat t.txt | rg "Stub: in file " | cut -d" " -f4 > t2.txt ``` -------- ```python from collections import defaultdict line_to_fix = defaultdict(set) with open("t2.txt") as f: for line in f: file_path, lineno = line.strip().split(":") line_to_fix[file_path].add(int(lineno)) for file_path, line_numbers in line_to_fix.items(): lines = ["from django.utils.functional import cached_property\n"] with open(file_path) as f: lines.extend(f.readlines()) nb_lines = len(lines) for line_number in line_numbers: if line_number str: ... @property def forms(self) -> list[BaseForm]: ... - @property + @cached_property def non_form_errors(self) -> Callable[[], ErrorList]: ... @property def media(self) -> Media: ... diff --git a/django-stubs/contrib/gis/db/backends/base/operations.pyi b/django-stubs/contrib/gis/db/backends/base/operations.pyi index fbebc81d2..bf6aa10d3 100644 --- a/django-stubs/contrib/gis/db/backends/base/operations.pyi +++ b/django-stubs/contrib/gis/db/backends/base/operations.pyi @@ -1,5 +1,7 @@ from typing import Any +from django.utils.functional import cached_property + class BaseSpatialOperations: postgis: bool spatialite: bool @@ -7,7 +9,7 @@ class BaseSpatialOperations: oracle: bool spatial_version: Any select: str - @property + @cached_property def select_extent(self) -> str: ... geography: bool geometry: bool diff --git a/django-stubs/contrib/gis/db/backends/mysql/features.pyi b/django-stubs/contrib/gis/db/backends/mysql/features.pyi index 411d49e61..f430f6a8e 100644 --- a/django-stubs/contrib/gis/db/backends/mysql/features.pyi +++ b/django-stubs/contrib/gis/db/backends/mysql/features.pyi @@ -2,6 +2,7 @@ from typing import Any from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures from django.db.backends.mysql.features import DatabaseFeatures as MySQLDatabaseFeatures +from django.utils.functional import cached_property class DatabaseFeatures(BaseSpatialFeatures, MySQLDatabaseFeatures): has_spatialrefsys_table: bool @@ -14,7 +15,7 @@ class DatabaseFeatures(BaseSpatialFeatures, MySQLDatabaseFeatures): supports_num_points_poly: bool @property def empty_intersection_returns_none(self) -> bool: ... - @property + @cached_property def supports_geometry_field_unique_index(self) -> bool: ... # type: ignore[override] - @property + @cached_property def django_test_skips(self) -> dict[str, Any]: ... # type: ignore[override] diff --git a/django-stubs/contrib/gis/db/backends/mysql/operations.pyi b/django-stubs/contrib/gis/db/backends/mysql/operations.pyi index 9d87b9c2f..4e8c8fda6 100644 --- a/django-stubs/contrib/gis/db/backends/mysql/operations.pyi +++ b/django-stubs/contrib/gis/db/backends/mysql/operations.pyi @@ -5,23 +5,24 @@ from django.contrib.gis.db.backends.base.operations import BaseSpatialOperations from django.contrib.gis.db.backends.utils import SpatialOperator from django.contrib.gis.geos.geometry import GEOSGeometryBase from django.db.backends.mysql.operations import DatabaseOperations +from django.utils.functional import cached_property class MySQLOperations(BaseSpatialOperations, DatabaseOperations): name: str geom_func_prefix: str Adapter: Any - @property + @cached_property def mariadb(self) -> bool: ... - @property + @cached_property def mysql(self) -> bool: ... # type: ignore[override] - @property + @cached_property def select(self) -> str: ... # type: ignore[override] - @property + @cached_property def from_text(self) -> str: ... # type: ignore[override] - @property + @cached_property def gis_operators(self) -> dict[str, SpatialOperator]: ... disallowed_aggregates: Any - @property + @cached_property def unsupported_functions(self) -> set[str]: ... # type: ignore[override] def geo_db_type(self, f: Any) -> Any: ... def get_distance(self, f: Any, value: Any, lookup_type: Any) -> list[Any]: ... diff --git a/django-stubs/contrib/gis/db/backends/spatialite/features.pyi b/django-stubs/contrib/gis/db/backends/spatialite/features.pyi index 2de6cefbf..97a3a1e85 100644 --- a/django-stubs/contrib/gis/db/backends/spatialite/features.pyi +++ b/django-stubs/contrib/gis/db/backends/spatialite/features.pyi @@ -1,7 +1,8 @@ from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures from django.db.backends.sqlite3.features import DatabaseFeatures as SQLiteDatabaseFeatures +from django.utils.functional import cached_property class DatabaseFeatures(BaseSpatialFeatures, SQLiteDatabaseFeatures): supports_3d_storage: bool - @property + @cached_property def supports_area_geodetic(self) -> bool: ... # type: ignore[override] diff --git a/django-stubs/contrib/gis/db/backends/spatialite/operations.pyi b/django-stubs/contrib/gis/db/backends/spatialite/operations.pyi index daf24e3b5..28e151225 100644 --- a/django-stubs/contrib/gis/db/backends/spatialite/operations.pyi +++ b/django-stubs/contrib/gis/db/backends/spatialite/operations.pyi @@ -3,6 +3,7 @@ from typing import Any from django.contrib.gis.db.backends.base.operations import BaseSpatialOperations from django.contrib.gis.db.backends.utils import SpatialOperator from django.db.backends.sqlite3.operations import DatabaseOperations +from django.utils.functional import cached_property class SpatialiteNullCheckOperator(SpatialOperator): ... @@ -18,7 +19,7 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations): disallowed_aggregates: Any select: str function_names: Any - @property + @cached_property def unsupported_functions(self) -> set[str]: ... # type: ignore[override] @property def spatial_version(self) -> Any: ... diff --git a/django-stubs/contrib/gis/gdal/raster/source.pyi b/django-stubs/contrib/gis/gdal/raster/source.pyi index c5208aceb..b8df1381f 100644 --- a/django-stubs/contrib/gis/gdal/raster/source.pyi +++ b/django-stubs/contrib/gis/gdal/raster/source.pyi @@ -7,6 +7,7 @@ from django.contrib.gis.gdal.driver import Driver from django.contrib.gis.gdal.raster.band import BandList from django.contrib.gis.gdal.raster.base import GDALRasterBase from django.contrib.gis.gdal.srs import SpatialReference +from django.utils.functional import cached_property class TransformPoint(list[Sequence[float]]): indices: dict[str, tuple[int, int]] @@ -26,11 +27,11 @@ class GDALRaster(GDALRasterBase): def __del__(self) -> None: ... @property def vsi_buffer(self) -> bytes | None: ... - @property + @cached_property def is_vsi_based(self) -> bool: ... @property def name(self) -> str: ... - @property + @cached_property def driver(self) -> Driver: ... @property def width(self) -> int: ... diff --git a/django-stubs/contrib/postgres/indexes.pyi b/django-stubs/contrib/postgres/indexes.pyi index ac10eb3ca..cc064c996 100644 --- a/django-stubs/contrib/postgres/indexes.pyi +++ b/django-stubs/contrib/postgres/indexes.pyi @@ -7,9 +7,10 @@ from django.db.models import Func, Index, Model from django.db.models.expressions import BaseExpression, Combinable from django.db.models.query_utils import Q from django.utils.datastructures import _ListOrTuple +from django.utils.functional import cached_property class PostgresIndex(Index): - @property + @cached_property def max_name_length(self) -> int: ... # type: ignore[override] def create_sql( self, model: type[Model], schema_editor: BaseDatabaseSchemaEditor, using: str = ..., **kwargs: Any diff --git a/django-stubs/contrib/sessions/backends/db.pyi b/django-stubs/contrib/sessions/backends/db.pyi index 6a84e5560..5357c1ef7 100644 --- a/django-stubs/contrib/sessions/backends/db.pyi +++ b/django-stubs/contrib/sessions/backends/db.pyi @@ -2,11 +2,12 @@ from typing import Any from django.contrib.sessions.backends.base import SessionBase from django.contrib.sessions.base_session import AbstractBaseSession +from django.utils.functional import cached_property class SessionStore(SessionBase): def __init__(self, session_key: str | None = ...) -> None: ... @classmethod def get_model_class(cls) -> type[AbstractBaseSession]: ... - @property + @cached_property def model(self) -> type[AbstractBaseSession]: ... def create_model_instance(self, data: dict[str, Any]) -> AbstractBaseSession: ... diff --git a/django-stubs/db/backends/base/base.pyi b/django-stubs/db/backends/base/base.pyi index a16d0eb19..be5ee2064 100644 --- a/django-stubs/db/backends/base/base.pyi +++ b/django-stubs/db/backends/base/base.pyi @@ -12,6 +12,7 @@ from django.db.backends.base.operations import BaseDatabaseOperations from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.backends.base.validation import BaseDatabaseValidation from django.db.backends.utils import CursorDebugWrapper, CursorWrapper +from django.utils.functional import cached_property from typing_extensions import Self, TypeAlias NO_DB_ALIAS: str @@ -65,9 +66,9 @@ class BaseDatabaseWrapper: operators: MutableMapping[str, str] def __init__(self, settings_dict: dict[str, Any], alias: str = ...) -> None: ... def ensure_timezone(self) -> bool: ... - @property + @cached_property def timezone(self) -> tzinfo | None: ... - @property + @cached_property def timezone_name(self) -> str: ... @property def queries_logged(self) -> bool: ... diff --git a/django-stubs/db/backends/base/features.pyi b/django-stubs/db/backends/base/features.pyi index ad54c8b8a..af81d6319 100644 --- a/django-stubs/db/backends/base/features.pyi +++ b/django-stubs/db/backends/base/features.pyi @@ -4,6 +4,7 @@ from typing import Any from django.db.backends.base.base import BaseDatabaseWrapper from django.db.models.base import Model from django.db.utils import DatabaseError, DataError +from django.utils.functional import cached_property class BaseDatabaseFeatures: minimum_database_version: tuple[int, ...] | None @@ -137,8 +138,8 @@ class BaseDatabaseFeatures: django_test_skips: dict[str, set[str]] connection: BaseDatabaseWrapper def __init__(self, connection: BaseDatabaseWrapper) -> None: ... - @property + @cached_property def supports_explaining_query_execution(self) -> bool: ... - @property + @cached_property def supports_transactions(self) -> bool: ... def allows_group_by_selected_pks_on_model(self, model: type[Model]) -> bool: ... diff --git a/django-stubs/db/backends/mysql/features.pyi b/django-stubs/db/backends/mysql/features.pyi index c8e243cfd..0dce894ed 100644 --- a/django-stubs/db/backends/mysql/features.pyi +++ b/django-stubs/db/backends/mysql/features.pyi @@ -2,6 +2,7 @@ from typing import Any from django.db.backends.base.features import BaseDatabaseFeatures from django.db.backends.mysql.base import DatabaseWrapper +from django.utils.functional import cached_property class DatabaseFeatures(BaseDatabaseFeatures): connection: DatabaseWrapper @@ -41,47 +42,47 @@ class DatabaseFeatures(BaseDatabaseFeatures): supports_frame_range_fixed_distance: bool supports_table_check_constraints: bool can_return_rows_from_bulk_insert: bool - @property + @cached_property def allows_auto_pk_0(self) -> bool: ... # type: ignore[override] - @property + @cached_property def update_can_self_select(self) -> bool: ... # type: ignore[override] - @property + @cached_property def can_introspect_foreign_keys(self) -> bool: ... # type: ignore[override] - @property + @cached_property def introspected_field_types(self) -> dict[str, str]: ... # type: ignore [override] - @property + @cached_property def can_return_columns_from_insert(self) -> bool: ... # type: ignore[override] - @property + @cached_property def has_zoneinfo_database(self) -> bool: ... # type: ignore[override] - @property + @cached_property def is_sql_auto_is_null_enabled(self) -> bool: ... - @property + @cached_property def supports_over_clause(self) -> bool: ... # type: ignore[override] - @property + @cached_property def supports_column_check_constraints(self) -> bool: ... # type: ignore[override] - @property + @cached_property def can_introspect_check_constraints(self) -> bool: ... # type: ignore[override] - @property + @cached_property def has_select_for_update_skip_locked(self) -> bool: ... # type: ignore[override] - @property + @cached_property def has_select_for_update_nowait(self) -> bool: ... # type: ignore[override] - @property + @cached_property def has_select_for_update_of(self) -> bool: ... # type: ignore[override] - @property + @cached_property def supports_explain_analyze(self) -> bool: ... - @property + @cached_property def supported_explain_formats(self) -> set[str]: ... # type: ignore[override] - @property + @cached_property def supports_transactions(self) -> bool: ... - @property + @cached_property def ignores_table_name_case(self) -> bool: ... # type: ignore[override] - @property + @cached_property def supports_default_in_lead_lag(self) -> bool: ... # type: ignore[override] @property def supports_json_field(self) -> bool: ... # type: ignore[override] - @property + @cached_property def can_introspect_json_field(self) -> bool: ... # type: ignore[override] - @property + @cached_property def supports_index_column_ordering(self) -> bool: ... # type: ignore[override] - @property + @cached_property def supports_expression_indexes(self) -> bool: ... # type: ignore[override] diff --git a/django-stubs/db/backends/postgresql/base.pyi b/django-stubs/db/backends/postgresql/base.pyi index 75e79b942..68e5d7e49 100644 --- a/django-stubs/db/backends/postgresql/base.pyi +++ b/django-stubs/db/backends/postgresql/base.pyi @@ -4,6 +4,7 @@ from typing import Any from django.db.backends.base.base import BaseDatabaseWrapper from django.db.backends.utils import CursorDebugWrapper as BaseCursorDebugWrapper from django.db.backends.utils import _ExecuteQuery +from django.utils.functional import cached_property from .client import DatabaseClient from .creation import DatabaseCreation @@ -34,7 +35,7 @@ class DatabaseWrapper(BaseDatabaseWrapper): # PostgreSQL backend-specific attributes. _named_cursor_idx: int - @property + @cached_property def pg_version(self) -> int: ... class CursorDebugWrapper(BaseCursorDebugWrapper): diff --git a/django-stubs/db/backends/postgresql/features.pyi b/django-stubs/db/backends/postgresql/features.pyi index a38178ba4..36b507074 100644 --- a/django-stubs/db/backends/postgresql/features.pyi +++ b/django-stubs/db/backends/postgresql/features.pyi @@ -2,6 +2,7 @@ from typing import Any from django.db.backends.base.features import BaseDatabaseFeatures from django.db.backends.postgresql.base import DatabaseWrapper +from django.utils.functional import cached_property class DatabaseFeatures(BaseDatabaseFeatures): connection: DatabaseWrapper @@ -49,7 +50,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): def is_postgresql_11(self) -> bool: ... @property def is_postgresql_12(self) -> bool: ... - @property + @cached_property def is_postgresql_13(self) -> bool: ... has_brin_autosummarize: bool has_websearch_to_tsquery: bool diff --git a/django-stubs/db/models/expressions.pyi b/django-stubs/db/models/expressions.pyi index a69e6c0c0..c065aef5f 100644 --- a/django-stubs/db/models/expressions.pyi +++ b/django-stubs/db/models/expressions.pyi @@ -11,6 +11,7 @@ from django.db.models.query import QuerySet from django.db.models.sql.compiler import SQLCompiler, _AsSqlType from django.db.models.sql.query import Query from django.utils.deconstruct import _Deconstructible +from django.utils.functional import cached_property from typing_extensions import Self, TypeAlias class SQLiteNumericMixin: @@ -64,11 +65,11 @@ class BaseExpression: def get_db_converters(self, connection: BaseDatabaseWrapper) -> list[Callable]: ... def get_source_expressions(self) -> list[Any]: ... def set_source_expressions(self, exprs: Sequence[Combinable]) -> None: ... - @property + @cached_property def contains_aggregate(self) -> bool: ... - @property + @cached_property def contains_over_clause(self) -> bool: ... - @property + @cached_property def contains_column_references(self) -> bool: ... def resolve_expression( self, @@ -84,7 +85,7 @@ class BaseExpression: def field(self) -> Field: ... @property def output_field(self) -> Field: ... - @property + @cached_property def convert_value(self) -> Callable: ... def get_lookup(self, lookup: str) -> type[Lookup] | None: ... def get_transform(self, name: str) -> type[Transform] | None: ... diff --git a/django-stubs/db/models/fields/__init__.pyi b/django-stubs/db/models/fields/__init__.pyi index aa5a81ac7..11ff30414 100644 --- a/django-stubs/db/models/fields/__init__.pyi +++ b/django-stubs/db/models/fields/__init__.pyi @@ -16,7 +16,7 @@ from django.db.models.fields.reverse_related import ForeignObjectRel from django.db.models.query_utils import Q, RegisterLookupMixin from django.forms import Widget from django.utils.datastructures import DictWrapper -from django.utils.functional import _Getter, _StrOrPromise +from django.utils.functional import _Getter, _StrOrPromise, cached_property from typing_extensions import Self, TypeAlias class Empty: ... @@ -212,7 +212,7 @@ class Field(RegisterLookupMixin, Generic[_ST, _GT]): def save_form_data(self, instance: Model, data: Any) -> None: ... def contribute_to_class(self, cls: type[Model], name: str, private_only: bool = ...) -> None: ... def to_python(self, value: Any) -> Any: ... - @property + @cached_property def validators(self) -> list[validators._ValidatorCallable]: ... def run_validators(self, value: Any) -> None: ... def validate(self, value: Any, model_instance: Model | None) -> None: ... @@ -231,7 +231,7 @@ class Field(RegisterLookupMixin, Generic[_ST, _GT]): def get_default(self) -> Any: ... def check(self, **kwargs: Any) -> list[CheckMessage]: ... def get_col(self, alias: str, output_field: Field | None = ...) -> Col: ... - @property + @cached_property def cached_col(self) -> Col: ... def value_from_object(self, obj: Model) -> _GT: ... def get_attname(self) -> str: ... diff --git a/django-stubs/db/models/fields/related.pyi b/django-stubs/db/models/fields/related.pyi index 340a52c44..d7fdbd9d1 100644 --- a/django-stubs/db/models/fields/related.pyi +++ b/django-stubs/db/models/fields/related.pyi @@ -18,7 +18,7 @@ from django.db.models.fields.reverse_related import ManyToManyRel as ManyToManyR from django.db.models.fields.reverse_related import ManyToOneRel as ManyToOneRel from django.db.models.fields.reverse_related import OneToOneRel as OneToOneRel from django.db.models.query_utils import FilteredRelation, PathInfo, Q -from django.utils.functional import _StrOrPromise +from django.utils.functional import _StrOrPromise, cached_property from typing_extensions import Self RECURSIVE_RELATIONSHIP_CONSTANT: Literal["self"] @@ -71,7 +71,7 @@ class RelatedField(FieldCacheMixin, Field[_ST, _GT]): error_messages: _ErrorMessagesMapping | None = ..., db_comment: str | None = ..., ) -> None: ... - @property + @cached_property def related_model(self) -> type[Model] | Literal["self"]: ... # type: ignore[override] def get_forward_related_filter(self, obj: Model) -> dict[str, int | UUID]: ... def get_reverse_related_filter(self, obj: Model) -> Q: ... @@ -132,13 +132,13 @@ class ForeignObject(RelatedField[_ST, _GT]): @overload def __get__(self, instance: Any, owner: Any) -> Self: ... def resolve_related_fields(self) -> list[tuple[Field, Field]]: ... - @property + @cached_property def related_fields(self) -> list[tuple[Field, Field]]: ... - @property + @cached_property def reverse_related_fields(self) -> list[tuple[Field, Field]]: ... - @property + @cached_property def local_related_fields(self) -> tuple[Field, ...]: ... - @property + @cached_property def foreign_related_fields(self) -> tuple[Field, ...]: ... class ForeignKey(ForeignObject[_ST, _GT]): diff --git a/django-stubs/db/models/fields/related_descriptors.pyi b/django-stubs/db/models/fields/related_descriptors.pyi index f5b2db95b..75bf0caef 100644 --- a/django-stubs/db/models/fields/related_descriptors.pyi +++ b/django-stubs/db/models/fields/related_descriptors.pyi @@ -9,6 +9,7 @@ from django.db.models.fields.reverse_related import ManyToManyRel, ManyToOneRel, from django.db.models.manager import BaseManager from django.db.models.query import QuerySet from django.db.models.query_utils import DeferredAttribute +from django.utils.functional import cached_property from typing_extensions import Self _M = TypeVar("_M", bound=Model) @@ -22,7 +23,7 @@ class ForeignKeyDeferredAttribute(DeferredAttribute): class ForwardManyToOneDescriptor(Generic[_F]): field: _F def __init__(self, field_with_rel: _F) -> None: ... - @property + @cached_property def RelatedObjectDoesNotExist(self) -> type[ObjectDoesNotExist]: ... def is_cached(self, instance: Model) -> bool: ... def get_queryset(self, **hints: Any) -> QuerySet: ... @@ -51,7 +52,7 @@ class ReverseOneToOneDescriptor(Generic[_From, _To]): related: OneToOneRel def __init__(self, related: OneToOneRel) -> None: ... - @property + @cached_property def RelatedObjectDoesNotExist(self) -> type[ObjectDoesNotExist]: ... def is_cached(self, instance: _From) -> bool: ... def get_queryset(self, **hints: Any) -> QuerySet[_To]: ... @@ -78,7 +79,7 @@ class ReverseManyToOneDescriptor: rel: ManyToOneRel field: ForeignKey def __init__(self, rel: ManyToOneRel) -> None: ... - @property + @cached_property def related_manager_cls(self) -> type[RelatedManager[Any]]: ... @overload def __get__(self, instance: None, cls: Any = ...) -> Self: ... @@ -121,7 +122,7 @@ class ManyToManyDescriptor(ReverseManyToOneDescriptor, Generic[_M]): def __init__(self, rel: ManyToManyRel, reverse: bool = ...) -> None: ... @property def through(self) -> type[_M]: ... - @property + @cached_property def related_manager_cls(self) -> type[ManyRelatedManager[Any]]: ... # type: ignore[override] # Fake class, Django defines 'ManyRelatedManager' inside a function body diff --git a/django-stubs/db/models/fields/reverse_related.pyi b/django-stubs/db/models/fields/reverse_related.pyi index 15410f17c..3f6183ea2 100644 --- a/django-stubs/db/models/fields/reverse_related.pyi +++ b/django-stubs/db/models/fields/reverse_related.pyi @@ -7,6 +7,7 @@ from django.db.models.fields.related import ForeignKey, ForeignObject, ManyToMan from django.db.models.lookups import Lookup, StartsWith from django.db.models.query_utils import FilteredRelation, PathInfo from django.db.models.sql.where import WhereNode +from django.utils.functional import cached_property from .mixins import FieldCacheMixin @@ -42,23 +43,23 @@ class ForeignObjectRel(FieldCacheMixin): parent_link: bool = ..., on_delete: Callable = ..., ) -> None: ... - @property + @cached_property def hidden(self) -> bool: ... - @property + @cached_property def name(self) -> str: ... @property def remote_field(self) -> ForeignObject: ... @property def target_field(self) -> AutoField: ... - @property + @cached_property def related_model(self) -> type[Model] | Literal["self"]: ... - @property + @cached_property def many_to_many(self) -> bool: ... - @property + @cached_property def many_to_one(self) -> bool: ... - @property + @cached_property def one_to_many(self) -> bool: ... - @property + @cached_property def one_to_one(self) -> bool: ... def get_lookup(self, lookup_name: str) -> type[Lookup] | None: ... def get_internal_type(self) -> str: ... diff --git a/django-stubs/db/models/lookups.pyi b/django-stubs/db/models/lookups.pyi index 495b55c6a..c97b3b22b 100644 --- a/django-stubs/db/models/lookups.pyi +++ b/django-stubs/db/models/lookups.pyi @@ -6,6 +6,7 @@ from django.db.models.expressions import Expression, Func from django.db.models.query_utils import RegisterLookupMixin from django.db.models.sql.compiler import SQLCompiler, _AsSqlType, _ParamT from django.utils.datastructures import OrderedSet +from django.utils.functional import cached_property from typing_extensions import Self _T = TypeVar("_T") @@ -35,9 +36,9 @@ class Lookup(Generic[_T]): def get_group_by_cols(self) -> list[Expression]: ... def as_sql(self, compiler: SQLCompiler, connection: BaseDatabaseWrapper) -> _AsSqlType: ... def as_oracle(self, compiler: SQLCompiler, connection: BaseDatabaseWrapper) -> _AsSqlType: ... - @property + @cached_property def contains_aggregate(self) -> bool: ... - @property + @cached_property def contains_over_clause(self) -> bool: ... @property def is_summary(self) -> bool: ... diff --git a/django-stubs/db/models/options.pyi b/django-stubs/db/models/options.pyi index 4385e5d2c..62b4077d6 100644 --- a/django-stubs/db/models/options.pyi +++ b/django-stubs/db/models/options.pyi @@ -13,7 +13,7 @@ from django.db.models.fields.reverse_related import ForeignObjectRel from django.db.models.manager import Manager from django.db.models.query_utils import PathInfo from django.utils.datastructures import ImmutableList, _ListOrTuple -from django.utils.functional import _StrOrPromise +from django.utils.functional import _StrOrPromise, cached_property from typing_extensions import TypeAlias PROXY_PARENTS: object @@ -101,17 +101,17 @@ class Options(Generic[_M]): def verbose_name_raw(self) -> str: ... @property def swapped(self) -> str | None: ... - @property + @cached_property def fields_map(self) -> dict[str, Field[Any, Any] | ForeignObjectRel]: ... - @property + @cached_property def managers(self) -> ImmutableList[Manager]: ... - @property + @cached_property def managers_map(self) -> dict[str, Manager]: ... - @property + @cached_property def base_manager(self) -> Manager: ... - @property + @cached_property def default_manager(self) -> Manager | None: ... - @property + @cached_property def fields(self) -> ImmutableList[Field[Any, Any]]: ... def get_field(self, field_name: str) -> Field | ForeignObjectRel | GenericForeignKey: ... def get_base_chain(self, model: type[Model]) -> list[type[Model]]: ... @@ -122,7 +122,7 @@ class Options(Generic[_M]): def get_fields( self, include_parents: bool = ..., include_hidden: bool = ... ) -> list[Field[Any, Any] | ForeignObjectRel | GenericForeignKey]: ... - @property + @cached_property def total_unique_constraints(self) -> list[UniqueConstraint]: ... - @property + @cached_property def db_returning_fields(self) -> list[Field[Any, Any]]: ... diff --git a/django-stubs/http/request.pyi b/django-stubs/http/request.pyi index 6b5125542..07b4cfe30 100644 --- a/django-stubs/http/request.pyi +++ b/django-stubs/http/request.pyi @@ -10,6 +10,7 @@ from django.contrib.sites.models import Site from django.core.files import uploadedfile, uploadhandler from django.urls import ResolverMatch from django.utils.datastructures import CaseInsensitiveMapping, ImmutableList, MultiValueDict +from django.utils.functional import cached_property from typing_extensions import Self, TypeAlias RAISE_ERROR: object @@ -90,12 +91,12 @@ class HttpRequest(BytesIO): def upload_handlers(self) -> UploadHandlerList: ... @upload_handlers.setter def upload_handlers(self, upload_handlers: UploadHandlerList) -> None: ... - @property + @cached_property def accepted_types(self) -> list[MediaType]: ... def parse_file_upload( self, META: Mapping[str, Any], post_data: BinaryIO ) -> tuple[QueryDict, MultiValueDict[str, uploadedfile.UploadedFile]]: ... - @property + @cached_property def headers(self) -> HttpHeaders: ... @property def body(self) -> bytes: ... From 0f7d40d239e54a9695273d5a3981cb11c87ad7c9 Mon Sep 17 00:00:00 2001 From: Thibaut Decombe Date: Mon, 6 Nov 2023 23:18:53 +0100 Subject: [PATCH 2/5] Fix some mypy override --- django-stubs/db/backends/dummy/features.pyi | 2 +- django-stubs/db/backends/oracle/features.pyi | 2 +- django-stubs/db/backends/postgresql/features.pyi | 2 +- django-stubs/db/models/expressions.pyi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/django-stubs/db/backends/dummy/features.pyi b/django-stubs/db/backends/dummy/features.pyi index 669b40f6f..c1fddcd26 100644 --- a/django-stubs/db/backends/dummy/features.pyi +++ b/django-stubs/db/backends/dummy/features.pyi @@ -1,5 +1,5 @@ from django.db.backends.base.features import BaseDatabaseFeatures class DummyDatabaseFeatures(BaseDatabaseFeatures): - supports_transactions: bool + supports_transactions: bool # type: ignore[assignment] uses_savepoints: bool diff --git a/django-stubs/db/backends/oracle/features.pyi b/django-stubs/db/backends/oracle/features.pyi index ce9e27455..1ad3b1498 100644 --- a/django-stubs/db/backends/oracle/features.pyi +++ b/django-stubs/db/backends/oracle/features.pyi @@ -14,7 +14,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): can_return_columns_from_insert: bool can_introspect_autofield: bool supports_subqueries_in_group_by: bool - supports_transactions: bool + supports_transactions: bool # type: ignore[assignment] supports_timezones: bool has_native_duration_field: bool can_defer_constraint_checks: bool diff --git a/django-stubs/db/backends/postgresql/features.pyi b/django-stubs/db/backends/postgresql/features.pyi index 36b507074..6cd2046d1 100644 --- a/django-stubs/db/backends/postgresql/features.pyi +++ b/django-stubs/db/backends/postgresql/features.pyi @@ -21,7 +21,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): has_select_for_no_key_update: bool can_release_savepoints: bool supports_tablespaces: bool - supports_transactions: bool + supports_transactions: bool # type: ignore[assignment] can_introspect_materialized_views: bool can_distinct_on_fields: bool can_rollback_ddl: bool diff --git a/django-stubs/db/models/expressions.pyi b/django-stubs/db/models/expressions.pyi index c065aef5f..a24e6aeb8 100644 --- a/django-stubs/db/models/expressions.pyi +++ b/django-stubs/db/models/expressions.pyi @@ -194,7 +194,7 @@ class Star(Expression): ... class Col(Expression): target: Field alias: str - contains_column_references: Literal[True] + contains_column_references: Literal[True] # type: ignore[assignment] possibly_multivalued: Literal[False] def __init__(self, alias: str, target: Field, output_field: Field | None = ...) -> None: ... From 300481b3059244f31127e70bdd37f3a4d8217ffc Mon Sep 17 00:00:00 2001 From: Thibaut Decombe Date: Fri, 13 Oct 2023 14:21:08 +0200 Subject: [PATCH 3/5] Remove extraneous spaces --- django-stubs/db/backends/mysql/base.pyi | 4 ++-- django-stubs/db/backends/mysql/features.pyi | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/django-stubs/db/backends/mysql/base.pyi b/django-stubs/db/backends/mysql/base.pyi index 914089217..b51618314 100644 --- a/django-stubs/db/backends/mysql/base.pyi +++ b/django-stubs/db/backends/mysql/base.pyi @@ -57,9 +57,9 @@ class DatabaseWrapper(BaseDatabaseWrapper): def check_constraints(self, table_names: Any | None = ...) -> None: ... def is_usable(self) -> bool: ... @property - def display_name(self) -> str: ... # type: ignore [override] + def display_name(self) -> str: ... # type: ignore[override] @property - def data_type_check_constraints(self) -> dict[str, str]: ... # type: ignore [override] + def data_type_check_constraints(self) -> dict[str, str]: ... # type: ignore[override] @property def mysql_server_data(self) -> dict[str, Any]: ... @property diff --git a/django-stubs/db/backends/mysql/features.pyi b/django-stubs/db/backends/mysql/features.pyi index 0dce894ed..1302e0b96 100644 --- a/django-stubs/db/backends/mysql/features.pyi +++ b/django-stubs/db/backends/mysql/features.pyi @@ -49,7 +49,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): @cached_property def can_introspect_foreign_keys(self) -> bool: ... # type: ignore[override] @cached_property - def introspected_field_types(self) -> dict[str, str]: ... # type: ignore [override] + def introspected_field_types(self) -> dict[str, str]: ... # type: ignore[override] @cached_property def can_return_columns_from_insert(self) -> bool: ... # type: ignore[override] @cached_property From 183189fb9045843695a96e04abeed754944fc347 Mon Sep 17 00:00:00 2001 From: Thibaut Decombe Date: Fri, 13 Oct 2023 14:11:57 +0200 Subject: [PATCH 4/5] Update allowlist and remove unused ignore --- django-stubs/db/backends/dummy/features.pyi | 2 +- django-stubs/db/backends/oracle/features.pyi | 2 +- .../db/backends/postgresql/features.pyi | 2 +- django-stubs/db/models/expressions.pyi | 2 +- scripts/stubtest/allowlist.txt | 130 ++++++++++++++++++ scripts/stubtest/allowlist_todo.txt | 129 ----------------- 6 files changed, 134 insertions(+), 133 deletions(-) diff --git a/django-stubs/db/backends/dummy/features.pyi b/django-stubs/db/backends/dummy/features.pyi index c1fddcd26..669b40f6f 100644 --- a/django-stubs/db/backends/dummy/features.pyi +++ b/django-stubs/db/backends/dummy/features.pyi @@ -1,5 +1,5 @@ from django.db.backends.base.features import BaseDatabaseFeatures class DummyDatabaseFeatures(BaseDatabaseFeatures): - supports_transactions: bool # type: ignore[assignment] + supports_transactions: bool uses_savepoints: bool diff --git a/django-stubs/db/backends/oracle/features.pyi b/django-stubs/db/backends/oracle/features.pyi index 1ad3b1498..ce9e27455 100644 --- a/django-stubs/db/backends/oracle/features.pyi +++ b/django-stubs/db/backends/oracle/features.pyi @@ -14,7 +14,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): can_return_columns_from_insert: bool can_introspect_autofield: bool supports_subqueries_in_group_by: bool - supports_transactions: bool # type: ignore[assignment] + supports_transactions: bool supports_timezones: bool has_native_duration_field: bool can_defer_constraint_checks: bool diff --git a/django-stubs/db/backends/postgresql/features.pyi b/django-stubs/db/backends/postgresql/features.pyi index 6cd2046d1..36b507074 100644 --- a/django-stubs/db/backends/postgresql/features.pyi +++ b/django-stubs/db/backends/postgresql/features.pyi @@ -21,7 +21,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): has_select_for_no_key_update: bool can_release_savepoints: bool supports_tablespaces: bool - supports_transactions: bool # type: ignore[assignment] + supports_transactions: bool can_introspect_materialized_views: bool can_distinct_on_fields: bool can_rollback_ddl: bool diff --git a/django-stubs/db/models/expressions.pyi b/django-stubs/db/models/expressions.pyi index a24e6aeb8..c065aef5f 100644 --- a/django-stubs/db/models/expressions.pyi +++ b/django-stubs/db/models/expressions.pyi @@ -194,7 +194,7 @@ class Star(Expression): ... class Col(Expression): target: Field alias: str - contains_column_references: Literal[True] # type: ignore[assignment] + contains_column_references: Literal[True] possibly_multivalued: Literal[False] def __init__(self, alias: str, target: Field, output_field: Field | None = ...) -> None: ... diff --git a/scripts/stubtest/allowlist.txt b/scripts/stubtest/allowlist.txt index 273a51ef5..b22e398f5 100644 --- a/scripts/stubtest/allowlist.txt +++ b/scripts/stubtest/allowlist.txt @@ -145,6 +145,7 @@ 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 + # `error: <...> is not present at runtime` # This happens often for variables removed in later django version. # We still keep them in stubs to be a bit more backward compatible. @@ -161,11 +162,47 @@ django.utils.functional.cached_property.__set__ django.utils.functional.cached_property.name # Ignore @cached_property error "cannot reconcile @property on stub with runtime object" +django.contrib.admin.helpers.InlineAdminFormSet.non_form_errors +django.contrib.contenttypes.fields.ReverseGenericManyToOneDescriptor.related_manager_cls +django.contrib.gis.db.backends.base.operations.BaseSpatialOperations.select_extent +django.contrib.gis.db.backends.mysql.features.DatabaseFeatures.django_test_skips +django.contrib.gis.db.backends.mysql.features.DatabaseFeatures.supports_geometry_field_unique_index +django.contrib.gis.db.backends.mysql.operations.MySQLOperations.from_text +django.contrib.gis.db.backends.mysql.operations.MySQLOperations.gis_operators +django.contrib.gis.db.backends.mysql.operations.MySQLOperations.mariadb +django.contrib.gis.db.backends.mysql.operations.MySQLOperations.mysql +django.contrib.gis.db.backends.mysql.operations.MySQLOperations.select +django.contrib.gis.db.backends.mysql.operations.MySQLOperations.unsupported_functions +django.contrib.gis.db.backends.spatialite.features.DatabaseFeatures.supports_area_geodetic +django.contrib.gis.db.backends.spatialite.operations.SpatiaLiteOperations.unsupported_functions +django.contrib.gis.db.models.DecimalField.validators +django.contrib.gis.db.models.Field.cached_col +django.contrib.gis.db.models.Field.validators +django.contrib.gis.db.models.ForeignObject.foreign_related_fields +django.contrib.gis.db.models.ForeignObject.local_related_fields +django.contrib.gis.db.models.ForeignObject.related_fields +django.contrib.gis.db.models.ForeignObject.reverse_related_fields +django.contrib.gis.db.models.ForeignObjectRel.hidden +django.contrib.gis.db.models.ForeignObjectRel.many_to_many +django.contrib.gis.db.models.ForeignObjectRel.many_to_one +django.contrib.gis.db.models.ForeignObjectRel.name +django.contrib.gis.db.models.ForeignObjectRel.one_to_many +django.contrib.gis.db.models.ForeignObjectRel.one_to_one +django.contrib.gis.db.models.ForeignObjectRel.related_model +django.contrib.gis.db.models.IntegerField.validators +django.contrib.gis.db.models.Lookup.contains_aggregate +django.contrib.gis.db.models.Lookup.contains_over_clause django.contrib.gis.forms.BaseForm.changed_data django.contrib.gis.forms.BaseFormSet.forms django.contrib.gis.forms.BaseFormSet.management_form django.contrib.gis.forms.BoundField.subwidgets +django.contrib.gis.gdal.GDALRaster.driver +django.contrib.gis.gdal.GDALRaster.is_vsi_based +django.contrib.gis.gdal.raster.source.GDALRaster.driver +django.contrib.gis.gdal.raster.source.GDALRaster.is_vsi_based django.contrib.postgres.expressions.ArraySubquery.output_field +django.contrib.postgres.indexes.PostgresIndex.max_name_length +django.contrib.sessions.backends.db.SessionStore.model django.core.files.File.size django.core.files.base.File.size django.core.files.storage.FileSystemStorage.base_location @@ -198,6 +235,33 @@ django.core.management.commands.makemessages.BuildFile.path django.core.management.commands.makemessages.BuildFile.work_path django.core.paginator.Paginator.count django.core.paginator.Paginator.num_pages +django.db.backends.base.base.BaseDatabaseWrapper.timezone +django.db.backends.base.base.BaseDatabaseWrapper.timezone_name +django.db.backends.base.features.BaseDatabaseFeatures.supports_explaining_query_execution +django.db.backends.base.features.BaseDatabaseFeatures.supports_transactions +django.db.backends.mysql.features.DatabaseFeatures.allows_auto_pk_0 +django.db.backends.mysql.features.DatabaseFeatures.can_introspect_check_constraints +django.db.backends.mysql.features.DatabaseFeatures.can_introspect_foreign_keys +django.db.backends.mysql.features.DatabaseFeatures.can_introspect_json_field +django.db.backends.mysql.features.DatabaseFeatures.can_return_columns_from_insert +django.db.backends.mysql.features.DatabaseFeatures.has_select_for_update_nowait +django.db.backends.mysql.features.DatabaseFeatures.has_select_for_update_of +django.db.backends.mysql.features.DatabaseFeatures.has_select_for_update_skip_locked +django.db.backends.mysql.features.DatabaseFeatures.has_zoneinfo_database +django.db.backends.mysql.features.DatabaseFeatures.ignores_table_name_case +django.db.backends.mysql.features.DatabaseFeatures.introspected_field_types +django.db.backends.mysql.features.DatabaseFeatures.is_sql_auto_is_null_enabled +django.db.backends.mysql.features.DatabaseFeatures.supported_explain_formats +django.db.backends.mysql.features.DatabaseFeatures.supports_column_check_constraints +django.db.backends.mysql.features.DatabaseFeatures.supports_default_in_lead_lag +django.db.backends.mysql.features.DatabaseFeatures.supports_explain_analyze +django.db.backends.mysql.features.DatabaseFeatures.supports_expression_indexes +django.db.backends.mysql.features.DatabaseFeatures.supports_index_column_ordering +django.db.backends.mysql.features.DatabaseFeatures.supports_over_clause +django.db.backends.mysql.features.DatabaseFeatures.supports_transactions +django.db.backends.mysql.features.DatabaseFeatures.update_can_self_select +django.db.backends.postgresql.base.DatabaseWrapper.pg_version +django.db.backends.postgresql.features.DatabaseFeatures.is_postgresql_13 django.db.migrations.RenameField.new_name_lower django.db.migrations.RenameField.old_name_lower django.db.migrations.RenameIndex.new_name_lower @@ -223,6 +287,68 @@ django.db.migrations.operations.models.RenameModel.new_name_lower django.db.migrations.operations.models.RenameModel.old_name_lower django.db.migrations.state.ModelState.name_lower django.db.migrations.state.ProjectState.apps +django.db.models.DecimalField.validators +django.db.models.Field.cached_col +django.db.models.Field.validators +django.db.models.ForeignObject.foreign_related_fields +django.db.models.ForeignObject.local_related_fields +django.db.models.ForeignObject.related_fields +django.db.models.ForeignObject.reverse_related_fields +django.db.models.ForeignObjectRel.hidden +django.db.models.ForeignObjectRel.many_to_many +django.db.models.ForeignObjectRel.many_to_one +django.db.models.ForeignObjectRel.name +django.db.models.ForeignObjectRel.one_to_many +django.db.models.ForeignObjectRel.one_to_one +django.db.models.ForeignObjectRel.related_model +django.db.models.IntegerField.validators +django.db.models.Lookup.contains_aggregate +django.db.models.Lookup.contains_over_clause +django.db.models.expressions.BaseExpression.contains_aggregate +django.db.models.expressions.BaseExpression.contains_column_references +django.db.models.expressions.BaseExpression.contains_over_clause +django.db.models.expressions.BaseExpression.convert_value +django.db.models.fields.DecimalField.validators +django.db.models.fields.Field.cached_col +django.db.models.fields.Field.validators +django.db.models.fields.IntegerField.validators +django.db.models.fields.related.ForeignObject.foreign_related_fields +django.db.models.fields.related.ForeignObject.local_related_fields +django.db.models.fields.related.ForeignObject.related_fields +django.db.models.fields.related.ForeignObject.reverse_related_fields +django.db.models.fields.related.ForeignObjectRel.hidden +django.db.models.fields.related.ForeignObjectRel.many_to_many +django.db.models.fields.related.ForeignObjectRel.many_to_one +django.db.models.fields.related.ForeignObjectRel.name +django.db.models.fields.related.ForeignObjectRel.one_to_many +django.db.models.fields.related.ForeignObjectRel.one_to_one +django.db.models.fields.related.ForeignObjectRel.related_model +django.db.models.fields.related.ForwardManyToOneDescriptor.RelatedObjectDoesNotExist +django.db.models.fields.related.ManyToManyDescriptor.related_manager_cls +django.db.models.fields.related.RelatedField.related_model +django.db.models.fields.related.ReverseManyToOneDescriptor.related_manager_cls +django.db.models.fields.related.ReverseOneToOneDescriptor.RelatedObjectDoesNotExist +django.db.models.fields.related_descriptors.ForwardManyToOneDescriptor.RelatedObjectDoesNotExist +django.db.models.fields.related_descriptors.ManyToManyDescriptor.related_manager_cls +django.db.models.fields.related_descriptors.ReverseManyToOneDescriptor.related_manager_cls +django.db.models.fields.related_descriptors.ReverseOneToOneDescriptor.RelatedObjectDoesNotExist +django.db.models.fields.reverse_related.ForeignObjectRel.hidden +django.db.models.fields.reverse_related.ForeignObjectRel.many_to_many +django.db.models.fields.reverse_related.ForeignObjectRel.many_to_one +django.db.models.fields.reverse_related.ForeignObjectRel.name +django.db.models.fields.reverse_related.ForeignObjectRel.one_to_many +django.db.models.fields.reverse_related.ForeignObjectRel.one_to_one +django.db.models.fields.reverse_related.ForeignObjectRel.related_model +django.db.models.lookups.Lookup.contains_aggregate +django.db.models.lookups.Lookup.contains_over_clause +django.db.models.options.Options.base_manager +django.db.models.options.Options.db_returning_fields +django.db.models.options.Options.default_manager +django.db.models.options.Options.fields +django.db.models.options.Options.fields_map +django.db.models.options.Options.managers +django.db.models.options.Options.managers_map +django.db.models.options.Options.total_unique_constraints django.db.models.query.RawQuerySet.columns django.db.models.query.RawQuerySet.model_fields django.db.models.sql.Query.base_table @@ -242,6 +368,10 @@ django.forms.formsets.BaseFormSet.forms django.forms.formsets.BaseFormSet.management_form django.forms.renderers.EngineMixin.engine django.forms.renderers.Jinja2.backend +django.http.HttpRequest.accepted_types +django.http.HttpRequest.headers +django.http.request.HttpRequest.accepted_types +django.http.request.HttpRequest.headers django.middleware.csrf.CsrfViewMiddleware.allowed_origin_subdomains django.middleware.csrf.CsrfViewMiddleware.allowed_origins_exact django.middleware.csrf.CsrfViewMiddleware.csrf_trusted_origins_hosts diff --git a/scripts/stubtest/allowlist_todo.txt b/scripts/stubtest/allowlist_todo.txt index d1423cda6..7f75c2e08 100644 --- a/scripts/stubtest/allowlist_todo.txt +++ b/scripts/stubtest/allowlist_todo.txt @@ -47,7 +47,6 @@ django.contrib.admin.helpers.AdminForm.fields django.contrib.admin.helpers.AdminForm.is_bound django.contrib.admin.helpers.AdminReadonlyField.get_admin_url django.contrib.admin.helpers.InlineAdminFormSet.is_bound -django.contrib.admin.helpers.InlineAdminFormSet.non_form_errors django.contrib.admin.helpers.InlineAdminFormSet.total_form_count django.contrib.admin.models.LogEntry.action_flag django.contrib.admin.models.LogEntry.action_time @@ -216,7 +215,6 @@ django.contrib.contenttypes.admin.GenericStackedInline django.contrib.contenttypes.admin.GenericTabularInline django.contrib.contenttypes.fields.GenericRelation.contribute_to_class django.contrib.contenttypes.fields.GenericRelation.get_extra_restriction -django.contrib.contenttypes.fields.ReverseGenericManyToOneDescriptor.related_manager_cls django.contrib.contenttypes.forms.generic_inlineformset_factory django.contrib.contenttypes.management.commands.remove_stale_contenttypes.Command.handle django.contrib.contenttypes.management.inject_rename_contenttypes_operations @@ -263,18 +261,9 @@ django.contrib.gis.db.backends.base.features.BaseSpatialFeatures.supports_geogra django.contrib.gis.db.backends.base.features.BaseSpatialFeatures.supports_tolerance_parameter django.contrib.gis.db.backends.base.features.BaseSpatialFeatures.unsupported_geojson_options django.contrib.gis.db.backends.base.operations.BaseSpatialOperations.mariadb -django.contrib.gis.db.backends.base.operations.BaseSpatialOperations.select_extent django.contrib.gis.db.backends.mysql.base -django.contrib.gis.db.backends.mysql.features.DatabaseFeatures.django_test_skips -django.contrib.gis.db.backends.mysql.features.DatabaseFeatures.supports_geometry_field_unique_index django.contrib.gis.db.backends.mysql.features.DatabaseFeatures.unsupported_geojson_options django.contrib.gis.db.backends.mysql.introspection -django.contrib.gis.db.backends.mysql.operations.MySQLOperations.from_text -django.contrib.gis.db.backends.mysql.operations.MySQLOperations.gis_operators -django.contrib.gis.db.backends.mysql.operations.MySQLOperations.mariadb -django.contrib.gis.db.backends.mysql.operations.MySQLOperations.mysql -django.contrib.gis.db.backends.mysql.operations.MySQLOperations.select -django.contrib.gis.db.backends.mysql.operations.MySQLOperations.unsupported_functions django.contrib.gis.db.backends.oracle.adapter django.contrib.gis.db.backends.oracle.base django.contrib.gis.db.backends.oracle.features.DatabaseFeatures.django_test_skips @@ -296,14 +285,12 @@ django.contrib.gis.db.backends.postgis.schema.PostGISSchemaEditor.rast_index_tem django.contrib.gis.db.backends.spatialite.base.DatabaseWrapper.ops django.contrib.gis.db.backends.spatialite.features.DatabaseFeatures.can_alter_geometry_field django.contrib.gis.db.backends.spatialite.features.DatabaseFeatures.django_test_skips -django.contrib.gis.db.backends.spatialite.features.DatabaseFeatures.supports_area_geodetic django.contrib.gis.db.backends.spatialite.models.SpatialiteGeometryColumns.Meta django.contrib.gis.db.backends.spatialite.models.SpatialiteSpatialRefSys.Meta django.contrib.gis.db.backends.spatialite.operations.SpatiaLiteOperations.convert_extent django.contrib.gis.db.backends.spatialite.operations.SpatiaLiteOperations.from_text django.contrib.gis.db.backends.spatialite.operations.SpatiaLiteOperations.geom_lib_version django.contrib.gis.db.backends.spatialite.operations.SpatiaLiteOperations.rttopo_version -django.contrib.gis.db.backends.spatialite.operations.SpatiaLiteOperations.unsupported_functions django.contrib.gis.db.models.Aggregate.__init__ django.contrib.gis.db.models.Aggregate.as_sql django.contrib.gis.db.models.Aggregate.default_alias @@ -338,7 +325,6 @@ django.contrib.gis.db.models.DateTimeField.formfield django.contrib.gis.db.models.DecimalField.class_lookups django.contrib.gis.db.models.DecimalField.context django.contrib.gis.db.models.DecimalField.formfield -django.contrib.gis.db.models.DecimalField.validators django.contrib.gis.db.models.DurationField.formfield django.contrib.gis.db.models.DurationField.get_db_converters django.contrib.gis.db.models.EmailField.formfield @@ -356,7 +342,6 @@ django.contrib.gis.db.models.Field.__gt__ django.contrib.gis.db.models.Field.__le__ django.contrib.gis.db.models.Field.__lt__ django.contrib.gis.db.models.Field.__set__ -django.contrib.gis.db.models.Field.cached_col django.contrib.gis.db.models.Field.cast_db_type django.contrib.gis.db.models.Field.class_lookups django.contrib.gis.db.models.Field.clone @@ -372,7 +357,6 @@ django.contrib.gis.db.models.Field.get_pk_value_on_save django.contrib.gis.db.models.Field.rel_db_type django.contrib.gis.db.models.Field.select_format django.contrib.gis.db.models.Field.unique -django.contrib.gis.db.models.Field.validators django.contrib.gis.db.models.FieldDoesNotExist django.contrib.gis.db.models.FieldFile django.contrib.gis.db.models.FileDescriptor @@ -394,7 +378,6 @@ django.contrib.gis.db.models.ForeignObject.__copy__ django.contrib.gis.db.models.ForeignObject.__get__ django.contrib.gis.db.models.ForeignObject.class_lookups django.contrib.gis.db.models.ForeignObject.contribute_to_related_class -django.contrib.gis.db.models.ForeignObject.foreign_related_fields django.contrib.gis.db.models.ForeignObject.forward_related_accessor_class django.contrib.gis.db.models.ForeignObject.get_class_lookups django.contrib.gis.db.models.ForeignObject.get_extra_descriptor_filter @@ -406,27 +389,17 @@ django.contrib.gis.db.models.ForeignObject.get_local_related_value django.contrib.gis.db.models.ForeignObject.get_path_info django.contrib.gis.db.models.ForeignObject.get_reverse_joining_columns django.contrib.gis.db.models.ForeignObject.get_reverse_path_info -django.contrib.gis.db.models.ForeignObject.local_related_fields django.contrib.gis.db.models.ForeignObject.path_infos django.contrib.gis.db.models.ForeignObject.related_accessor_class -django.contrib.gis.db.models.ForeignObject.related_fields django.contrib.gis.db.models.ForeignObject.requires_unique_target django.contrib.gis.db.models.ForeignObject.reverse_path_infos -django.contrib.gis.db.models.ForeignObject.reverse_related_fields django.contrib.gis.db.models.ForeignObjectRel.__init__ django.contrib.gis.db.models.ForeignObjectRel.empty_strings_allowed django.contrib.gis.db.models.ForeignObjectRel.get_extra_restriction django.contrib.gis.db.models.ForeignObjectRel.get_lookups django.contrib.gis.db.models.ForeignObjectRel.get_transform -django.contrib.gis.db.models.ForeignObjectRel.hidden django.contrib.gis.db.models.ForeignObjectRel.identity -django.contrib.gis.db.models.ForeignObjectRel.many_to_many -django.contrib.gis.db.models.ForeignObjectRel.many_to_one -django.contrib.gis.db.models.ForeignObjectRel.name -django.contrib.gis.db.models.ForeignObjectRel.one_to_many -django.contrib.gis.db.models.ForeignObjectRel.one_to_one django.contrib.gis.db.models.ForeignObjectRel.path_infos -django.contrib.gis.db.models.ForeignObjectRel.related_model django.contrib.gis.db.models.Func.function django.contrib.gis.db.models.GenericIPAddressField.formfield django.contrib.gis.db.models.GeoAggregate @@ -439,13 +412,10 @@ django.contrib.gis.db.models.ImageField.formfield django.contrib.gis.db.models.IntegerChoices.__new__ django.contrib.gis.db.models.IntegerField.class_lookups django.contrib.gis.db.models.IntegerField.formfield -django.contrib.gis.db.models.IntegerField.validators django.contrib.gis.db.models.JSONField.class_lookups django.contrib.gis.db.models.JSONField.formfield django.contrib.gis.db.models.JSONField.from_db_value django.contrib.gis.db.models.JSONField.get_transform -django.contrib.gis.db.models.Lookup.contains_aggregate -django.contrib.gis.db.models.Lookup.contains_over_clause django.contrib.gis.db.models.Lookup.get_prep_lhs django.contrib.gis.db.models.Lookup.lookup_name django.contrib.gis.db.models.Lookup.output_field @@ -594,8 +564,6 @@ django.contrib.gis.forms.formset_factory django.contrib.gis.forms.inlineformset_factory django.contrib.gis.forms.modelform_factory django.contrib.gis.forms.modelformset_factory -django.contrib.gis.gdal.GDALRaster.driver -django.contrib.gis.gdal.GDALRaster.is_vsi_based django.contrib.gis.gdal.OGRGeometry.geojson django.contrib.gis.gdal.SpatialReference.pretty_wkt django.contrib.gis.gdal.SpatialReference.xml @@ -610,8 +578,6 @@ django.contrib.gis.gdal.raster.const.GDAL_TO_CTYPES django.contrib.gis.gdal.raster.const.VSI_FILESYSTEM_BASE_PATH django.contrib.gis.gdal.raster.const.VSI_FILESYSTEM_PREFIX django.contrib.gis.gdal.raster.const.VSI_MEM_FILESYSTEM_BASE_PATH -django.contrib.gis.gdal.raster.source.GDALRaster.driver -django.contrib.gis.gdal.raster.source.GDALRaster.is_vsi_based django.contrib.gis.gdal.srs.SpatialReference.pretty_wkt django.contrib.gis.gdal.srs.SpatialReference.xml django.contrib.gis.geoip2.GeoIP2 @@ -740,7 +706,6 @@ django.contrib.postgres.forms.SplitArrayWidget.__deepcopy__ django.contrib.postgres.forms.array.SplitArrayWidget.__deepcopy__ django.contrib.postgres.forms.jsonb django.contrib.postgres.forms.ranges.BaseRangeField.hidden_widget -django.contrib.postgres.indexes.PostgresIndex.max_name_length django.contrib.postgres.lookups.SearchLookup.process_lhs django.contrib.postgres.search.SearchHeadline.as_sql django.contrib.postgres.search.SearchQuery.as_sql @@ -758,7 +723,6 @@ django.contrib.redirects.models.Redirect.site_id django.contrib.sessions.backends.base.SessionBase.get django.contrib.sessions.backends.base.SessionBase.setdefault django.contrib.sessions.backends.base.SessionBase.update -django.contrib.sessions.backends.db.SessionStore.model django.contrib.sessions.backends.signed_cookies.SessionStore.exists django.contrib.sessions.base_session.AbstractBaseSession.Meta.abstract django.contrib.sessions.base_session.AbstractBaseSession.Meta.verbose_name @@ -888,43 +852,18 @@ django.core.signing.Signer.signature django.core.signing.b62_decode django.core.signing.b62_encode django.core.signing.loads -django.db.backends.base.base.BaseDatabaseWrapper.timezone -django.db.backends.base.base.BaseDatabaseWrapper.timezone_name -django.db.backends.base.features.BaseDatabaseFeatures.supports_explaining_query_execution -django.db.backends.base.features.BaseDatabaseFeatures.supports_transactions django.db.backends.ddl_references.Expressions django.db.backends.mysql.base -django.db.backends.mysql.features.DatabaseFeatures.allows_auto_pk_0 -django.db.backends.mysql.features.DatabaseFeatures.can_introspect_check_constraints -django.db.backends.mysql.features.DatabaseFeatures.can_introspect_foreign_keys -django.db.backends.mysql.features.DatabaseFeatures.can_introspect_json_field django.db.backends.mysql.features.DatabaseFeatures.can_release_savepoints django.db.backends.mysql.features.DatabaseFeatures.can_rename_index -django.db.backends.mysql.features.DatabaseFeatures.can_return_columns_from_insert django.db.backends.mysql.features.DatabaseFeatures.can_return_rows_from_bulk_insert django.db.backends.mysql.features.DatabaseFeatures.django_test_skips -django.db.backends.mysql.features.DatabaseFeatures.has_select_for_update_nowait -django.db.backends.mysql.features.DatabaseFeatures.has_select_for_update_of -django.db.backends.mysql.features.DatabaseFeatures.has_select_for_update_skip_locked -django.db.backends.mysql.features.DatabaseFeatures.has_zoneinfo_database -django.db.backends.mysql.features.DatabaseFeatures.ignores_table_name_case -django.db.backends.mysql.features.DatabaseFeatures.introspected_field_types -django.db.backends.mysql.features.DatabaseFeatures.is_sql_auto_is_null_enabled django.db.backends.mysql.features.DatabaseFeatures.minimum_database_version -django.db.backends.mysql.features.DatabaseFeatures.supported_explain_formats -django.db.backends.mysql.features.DatabaseFeatures.supports_column_check_constraints -django.db.backends.mysql.features.DatabaseFeatures.supports_default_in_lead_lag -django.db.backends.mysql.features.DatabaseFeatures.supports_explain_analyze -django.db.backends.mysql.features.DatabaseFeatures.supports_expression_indexes django.db.backends.mysql.features.DatabaseFeatures.supports_frame_range_fixed_distance -django.db.backends.mysql.features.DatabaseFeatures.supports_index_column_ordering -django.db.backends.mysql.features.DatabaseFeatures.supports_over_clause django.db.backends.mysql.features.DatabaseFeatures.supports_select_difference django.db.backends.mysql.features.DatabaseFeatures.supports_select_intersection django.db.backends.mysql.features.DatabaseFeatures.supports_table_check_constraints -django.db.backends.mysql.features.DatabaseFeatures.supports_transactions django.db.backends.mysql.features.DatabaseFeatures.test_collations -django.db.backends.mysql.features.DatabaseFeatures.update_can_self_select django.db.backends.mysql.features.DatabaseFeatures.uses_savepoints django.db.backends.mysql.introspection django.db.backends.mysql.schema.DatabaseSchemaEditor.sql_alter_column_comment @@ -937,7 +876,6 @@ django.db.backends.oracle.utils django.db.backends.postgresql.base.DatabaseWrapper.Database django.db.backends.postgresql.base.DatabaseWrapper.ensure_role django.db.backends.postgresql.base.DatabaseWrapper.ops -django.db.backends.postgresql.base.DatabaseWrapper.pg_version django.db.backends.postgresql.base.DatabaseWrapper.tzinfo_factory django.db.backends.postgresql.base.INETARRAY django.db.backends.postgresql.base.INETARRAY_OID @@ -950,7 +888,6 @@ django.db.backends.postgresql.features.DatabaseFeatures.introspected_field_types django.db.backends.postgresql.features.DatabaseFeatures.is_postgresql_10 django.db.backends.postgresql.features.DatabaseFeatures.is_postgresql_11 django.db.backends.postgresql.features.DatabaseFeatures.is_postgresql_12 -django.db.backends.postgresql.features.DatabaseFeatures.is_postgresql_13 django.db.backends.postgresql.features.DatabaseFeatures.is_postgresql_14 django.db.backends.postgresql.features.DatabaseFeatures.prohibits_null_characters_in_text_exception django.db.backends.postgresql.features.DatabaseFeatures.supports_covering_spgist_indexes @@ -1055,7 +992,6 @@ django.db.models.DateTimeField.formfield django.db.models.DecimalField.class_lookups django.db.models.DecimalField.context django.db.models.DecimalField.formfield -django.db.models.DecimalField.validators django.db.models.DurationField.formfield django.db.models.DurationField.get_db_converters django.db.models.EmailField.formfield @@ -1071,7 +1007,6 @@ django.db.models.Field.__gt__ django.db.models.Field.__le__ django.db.models.Field.__lt__ django.db.models.Field.__set__ -django.db.models.Field.cached_col django.db.models.Field.cast_db_type django.db.models.Field.class_lookups django.db.models.Field.clone @@ -1087,7 +1022,6 @@ django.db.models.Field.get_pk_value_on_save django.db.models.Field.rel_db_type django.db.models.Field.select_format django.db.models.Field.unique -django.db.models.Field.validators django.db.models.FieldDoesNotExist django.db.models.FieldFile django.db.models.FileDescriptor @@ -1109,7 +1043,6 @@ django.db.models.ForeignObject.__copy__ django.db.models.ForeignObject.__get__ django.db.models.ForeignObject.class_lookups django.db.models.ForeignObject.contribute_to_related_class -django.db.models.ForeignObject.foreign_related_fields django.db.models.ForeignObject.forward_related_accessor_class django.db.models.ForeignObject.get_class_lookups django.db.models.ForeignObject.get_extra_descriptor_filter @@ -1121,27 +1054,17 @@ django.db.models.ForeignObject.get_local_related_value django.db.models.ForeignObject.get_path_info django.db.models.ForeignObject.get_reverse_joining_columns django.db.models.ForeignObject.get_reverse_path_info -django.db.models.ForeignObject.local_related_fields django.db.models.ForeignObject.path_infos django.db.models.ForeignObject.related_accessor_class -django.db.models.ForeignObject.related_fields django.db.models.ForeignObject.requires_unique_target django.db.models.ForeignObject.reverse_path_infos -django.db.models.ForeignObject.reverse_related_fields django.db.models.ForeignObjectRel.__init__ django.db.models.ForeignObjectRel.empty_strings_allowed django.db.models.ForeignObjectRel.get_extra_restriction django.db.models.ForeignObjectRel.get_lookups django.db.models.ForeignObjectRel.get_transform -django.db.models.ForeignObjectRel.hidden django.db.models.ForeignObjectRel.identity -django.db.models.ForeignObjectRel.many_to_many -django.db.models.ForeignObjectRel.many_to_one -django.db.models.ForeignObjectRel.name -django.db.models.ForeignObjectRel.one_to_many -django.db.models.ForeignObjectRel.one_to_one django.db.models.ForeignObjectRel.path_infos -django.db.models.ForeignObjectRel.related_model django.db.models.Func.function django.db.models.GenericIPAddressField.formfield django.db.models.ImageField.__get__ @@ -1152,13 +1075,10 @@ django.db.models.ImageField.formfield django.db.models.IntegerChoices.__new__ django.db.models.IntegerField.class_lookups django.db.models.IntegerField.formfield -django.db.models.IntegerField.validators django.db.models.JSONField.class_lookups django.db.models.JSONField.formfield django.db.models.JSONField.from_db_value django.db.models.JSONField.get_transform -django.db.models.Lookup.contains_aggregate -django.db.models.Lookup.contains_over_clause django.db.models.Lookup.get_prep_lhs django.db.models.Lookup.lookup_name django.db.models.Lookup.output_field @@ -1276,10 +1196,6 @@ django.db.models.enums.ChoicesMeta.values django.db.models.enums.IntegerChoices.__new__ django.db.models.enums.TextChoices.__new__ django.db.models.enums.enum_property -django.db.models.expressions.BaseExpression.contains_aggregate -django.db.models.expressions.BaseExpression.contains_column_references -django.db.models.expressions.BaseExpression.contains_over_clause -django.db.models.expressions.BaseExpression.convert_value django.db.models.expressions.BaseExpression.empty_result_set_value django.db.models.expressions.BaseExpression.get_refs django.db.models.expressions.BaseExpression.output_field @@ -1337,7 +1253,6 @@ django.db.models.fields.DateTimeField.formfield django.db.models.fields.DecimalField.class_lookups django.db.models.fields.DecimalField.context django.db.models.fields.DecimalField.formfield -django.db.models.fields.DecimalField.validators django.db.models.fields.DurationField.formfield django.db.models.fields.DurationField.get_db_converters django.db.models.fields.EmailField.formfield @@ -1349,7 +1264,6 @@ django.db.models.fields.Field.__gt__ django.db.models.fields.Field.__le__ django.db.models.fields.Field.__lt__ django.db.models.fields.Field.__set__ -django.db.models.fields.Field.cached_col django.db.models.fields.Field.cast_db_type django.db.models.fields.Field.class_lookups django.db.models.fields.Field.clone @@ -1365,7 +1279,6 @@ django.db.models.fields.Field.get_pk_value_on_save django.db.models.fields.Field.rel_db_type django.db.models.fields.Field.select_format django.db.models.fields.Field.unique -django.db.models.fields.Field.validators django.db.models.fields.FieldDoesNotExist django.db.models.fields.FilePathField.formfield django.db.models.fields.FloatField.class_lookups @@ -1373,7 +1286,6 @@ django.db.models.fields.FloatField.formfield django.db.models.fields.GenericIPAddressField.formfield django.db.models.fields.IntegerField.class_lookups django.db.models.fields.IntegerField.formfield -django.db.models.fields.IntegerField.validators django.db.models.fields.PositiveBigIntegerField.formfield django.db.models.fields.PositiveBigIntegerField.integer_field_class django.db.models.fields.PositiveIntegerField.formfield @@ -1425,7 +1337,6 @@ django.db.models.fields.related.ForeignObject.__copy__ django.db.models.fields.related.ForeignObject.__get__ django.db.models.fields.related.ForeignObject.class_lookups django.db.models.fields.related.ForeignObject.contribute_to_related_class -django.db.models.fields.related.ForeignObject.foreign_related_fields django.db.models.fields.related.ForeignObject.forward_related_accessor_class django.db.models.fields.related.ForeignObject.get_class_lookups django.db.models.fields.related.ForeignObject.get_extra_descriptor_filter @@ -1437,29 +1348,17 @@ django.db.models.fields.related.ForeignObject.get_local_related_value django.db.models.fields.related.ForeignObject.get_path_info django.db.models.fields.related.ForeignObject.get_reverse_joining_columns django.db.models.fields.related.ForeignObject.get_reverse_path_info -django.db.models.fields.related.ForeignObject.local_related_fields django.db.models.fields.related.ForeignObject.path_infos django.db.models.fields.related.ForeignObject.related_accessor_class -django.db.models.fields.related.ForeignObject.related_fields django.db.models.fields.related.ForeignObject.requires_unique_target django.db.models.fields.related.ForeignObject.reverse_path_infos -django.db.models.fields.related.ForeignObject.reverse_related_fields django.db.models.fields.related.ForeignObjectRel.__init__ django.db.models.fields.related.ForeignObjectRel.empty_strings_allowed django.db.models.fields.related.ForeignObjectRel.get_extra_restriction django.db.models.fields.related.ForeignObjectRel.get_lookups django.db.models.fields.related.ForeignObjectRel.get_transform -django.db.models.fields.related.ForeignObjectRel.hidden django.db.models.fields.related.ForeignObjectRel.identity -django.db.models.fields.related.ForeignObjectRel.many_to_many -django.db.models.fields.related.ForeignObjectRel.many_to_one -django.db.models.fields.related.ForeignObjectRel.name -django.db.models.fields.related.ForeignObjectRel.one_to_many -django.db.models.fields.related.ForeignObjectRel.one_to_one django.db.models.fields.related.ForeignObjectRel.path_infos -django.db.models.fields.related.ForeignObjectRel.related_model -django.db.models.fields.related.ForwardManyToOneDescriptor.RelatedObjectDoesNotExist -django.db.models.fields.related.ManyToManyDescriptor.related_manager_cls django.db.models.fields.related.ManyToManyField.__get__ django.db.models.fields.related.ManyToManyField.contribute_to_class django.db.models.fields.related.ManyToManyField.formfield @@ -1480,15 +1379,8 @@ django.db.models.fields.related.OneToOneField.forward_related_accessor_class django.db.models.fields.related.OneToOneField.related_accessor_class django.db.models.fields.related.OneToOneRel.__init__ django.db.models.fields.related.RelatedField.formfield -django.db.models.fields.related.RelatedField.related_model -django.db.models.fields.related.ReverseManyToOneDescriptor.related_manager_cls -django.db.models.fields.related.ReverseOneToOneDescriptor.RelatedObjectDoesNotExist django.db.models.fields.related.lazy_related_operation django.db.models.fields.related_descriptors.ForeignKeyDeferredAttribute.__set__ -django.db.models.fields.related_descriptors.ForwardManyToOneDescriptor.RelatedObjectDoesNotExist -django.db.models.fields.related_descriptors.ManyToManyDescriptor.related_manager_cls -django.db.models.fields.related_descriptors.ReverseManyToOneDescriptor.related_manager_cls -django.db.models.fields.related_descriptors.ReverseOneToOneDescriptor.RelatedObjectDoesNotExist django.db.models.fields.related_lookups.MultiColSource.contains_over_clause django.db.models.fields.related_lookups.MultiColSource.resolve_expression django.db.models.fields.related_lookups.RelatedLookupMixin.as_sql @@ -1497,15 +1389,8 @@ django.db.models.fields.reverse_related.ForeignObjectRel.empty_strings_allowed django.db.models.fields.reverse_related.ForeignObjectRel.get_extra_restriction django.db.models.fields.reverse_related.ForeignObjectRel.get_lookups django.db.models.fields.reverse_related.ForeignObjectRel.get_transform -django.db.models.fields.reverse_related.ForeignObjectRel.hidden django.db.models.fields.reverse_related.ForeignObjectRel.identity -django.db.models.fields.reverse_related.ForeignObjectRel.many_to_many -django.db.models.fields.reverse_related.ForeignObjectRel.many_to_one -django.db.models.fields.reverse_related.ForeignObjectRel.name -django.db.models.fields.reverse_related.ForeignObjectRel.one_to_many -django.db.models.fields.reverse_related.ForeignObjectRel.one_to_one django.db.models.fields.reverse_related.ForeignObjectRel.path_infos -django.db.models.fields.reverse_related.ForeignObjectRel.related_model django.db.models.fields.reverse_related.ManyToManyRel.identity django.db.models.fields.reverse_related.ManyToOneRel.__init__ django.db.models.fields.reverse_related.ManyToOneRel.identity @@ -1582,8 +1467,6 @@ django.db.models.indexes.IndexExpression.wrapper_classes django.db.models.lookups.FieldGetDbPrepValueIterableMixin.batch_process_rhs django.db.models.lookups.FieldGetDbPrepValueIterableMixin.process_rhs django.db.models.lookups.IExact.process_rhs -django.db.models.lookups.Lookup.contains_aggregate -django.db.models.lookups.Lookup.contains_over_clause django.db.models.lookups.Lookup.get_prep_lhs django.db.models.lookups.Lookup.lookup_name django.db.models.lookups.Lookup.output_field @@ -1656,19 +1539,11 @@ django.db.models.manager.BaseManager.using django.db.models.manager.BaseManager.values django.db.models.manager.BaseManager.values_list django.db.models.manager.Manager.__slotnames__ -django.db.models.options.Options.base_manager django.db.models.options.Options.concrete_fields -django.db.models.options.Options.db_returning_fields -django.db.models.options.Options.default_manager -django.db.models.options.Options.fields -django.db.models.options.Options.fields_map django.db.models.options.Options.installed django.db.models.options.Options.local_concrete_fields -django.db.models.options.Options.managers -django.db.models.options.Options.managers_map django.db.models.options.Options.many_to_many django.db.models.options.Options.related_objects -django.db.models.options.Options.total_unique_constraints django.db.models.query.BaseIterable.__aiter__ django.db.models.query.EmptyQuerySet.__init__ django.db.models.query.QuerySet.__contains__ @@ -1903,9 +1778,7 @@ django.forms.widgets.Widget.subwidgets django.forms.widgets.Widget.use_fieldset django.http.HttpHeaders django.http.HttpRequest.__init__ -django.http.HttpRequest.accepted_types django.http.HttpRequest.get_raw_uri -django.http.HttpRequest.headers django.http.HttpRequest.is_ajax django.http.HttpRequest.readlines django.http.HttpResponseBase.__iter__ @@ -1914,9 +1787,7 @@ django.http.StreamingHttpResponse.content django.http.multipartparser.MultiPartParser.IE_sanitize django.http.multipartparser.MultiPartParser.boundary_re django.http.request.HttpRequest.__init__ -django.http.request.HttpRequest.accepted_types django.http.request.HttpRequest.get_raw_uri -django.http.request.HttpRequest.headers django.http.request.HttpRequest.is_ajax django.http.request.HttpRequest.readlines django.http.request.UploadHandlerList From dc39f697ab415a6159429f5379e4a8c77b00906b Mon Sep 17 00:00:00 2001 From: Thibaut Decombe Date: Mon, 6 Nov 2023 23:39:57 +0100 Subject: [PATCH 5/5] Fix after CR --- django-stubs/contrib/admin/helpers.pyi | 4 +--- scripts/stubtest/allowlist.txt | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/django-stubs/contrib/admin/helpers.pyi b/django-stubs/contrib/admin/helpers.pyi index 3ab1e97e1..58a068d5f 100644 --- a/django-stubs/contrib/admin/helpers.pyi +++ b/django-stubs/contrib/admin/helpers.pyi @@ -10,7 +10,6 @@ from django.forms.boundfield import BoundField from django.forms.models import ModelForm from django.forms.utils import ErrorDict, ErrorList from django.forms.widgets import Media, Widget -from django.utils.functional import cached_property from django.utils.safestring import SafeString from typing_extensions import TypedDict @@ -147,8 +146,7 @@ class InlineAdminFormSet: def inline_formset_data(self) -> str: ... @property def forms(self) -> list[BaseForm]: ... - @cached_property - def non_form_errors(self) -> Callable[[], ErrorList]: ... + def non_form_errors(self) -> ErrorList: ... @property def media(self) -> Media: ... diff --git a/scripts/stubtest/allowlist.txt b/scripts/stubtest/allowlist.txt index b22e398f5..77b7b4103 100644 --- a/scripts/stubtest/allowlist.txt +++ b/scripts/stubtest/allowlist.txt @@ -162,7 +162,6 @@ django.utils.functional.cached_property.__set__ django.utils.functional.cached_property.name # Ignore @cached_property error "cannot reconcile @property on stub with runtime object" -django.contrib.admin.helpers.InlineAdminFormSet.non_form_errors django.contrib.contenttypes.fields.ReverseGenericManyToOneDescriptor.related_manager_cls django.contrib.gis.db.backends.base.operations.BaseSpatialOperations.select_extent django.contrib.gis.db.backends.mysql.features.DatabaseFeatures.django_test_skips