Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0: Update django.db.models.fields.reverse_related #2158

Merged
merged 2 commits into from
May 13, 2024
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
5 changes: 4 additions & 1 deletion django-stubs/db/models/fields/reverse_related.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ from typing import Any, Literal
from django.db.models.base import Model
from django.db.models.fields import AutoField, Field, _AllLimitChoicesTo, _ChoicesList, _LimitChoicesTo
from django.db.models.fields.related import ForeignKey, ForeignObject, ManyToManyField, OneToOneField
from django.db.models.lookups import Lookup, StartsWith
from django.db.models.lookups import Lookup, StartsWith, Transform
from django.db.models.query_utils import FilteredRelation, PathInfo
from django.db.models.sql.where import WhereNode
from django.utils.functional import cached_property
Expand Down Expand Up @@ -62,6 +62,8 @@ class ForeignObjectRel(FieldCacheMixin):
@cached_property
def one_to_one(self) -> bool: ...
def get_lookup(self, lookup_name: str) -> type[Lookup] | None: ...
def get_lookups(self) -> dict[str, Any]: ...
def get_transform(self, name: str) -> type[Transform] | None: ...
def get_internal_type(self) -> str: ...
@property
def db_type(self) -> Any: ...
Expand All @@ -76,6 +78,7 @@ class ForeignObjectRel(FieldCacheMixin):
) -> _ChoicesList: ...
def is_hidden(self) -> bool: ...
def get_joining_columns(self) -> tuple: ...
def get_joining_fields(self) -> tuple[tuple[Field, Field], ...]: ...
def get_extra_restriction(
self, where_class: type[WhereNode], alias: str, related_alias: str
) -> StartsWith | WhereNode | None: ...
Expand Down
8 changes: 0 additions & 8 deletions scripts/stubtest/allowlist_todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,6 @@ django.contrib.gis.db.models.ForeignObject.reverse_path_infos
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.identity
django.contrib.gis.db.models.ForeignObjectRel.path_infos
django.contrib.gis.db.models.Func.function
Expand Down Expand Up @@ -752,8 +750,6 @@ django.db.models.ForeignObject.reverse_path_infos
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.identity
django.db.models.ForeignObjectRel.path_infos
django.db.models.Func.function
Expand Down Expand Up @@ -994,8 +990,6 @@ django.db.models.fields.related.ForeignObject.reverse_path_infos
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.identity
django.db.models.fields.related.ForeignObjectRel.path_infos
django.db.models.fields.related.ManyToManyField.__get__
Expand Down Expand Up @@ -1026,8 +1020,6 @@ django.db.models.fields.related_lookups.RelatedLookupMixin.as_sql
django.db.models.fields.reverse_related.ForeignObjectRel.__init__
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.identity
django.db.models.fields.reverse_related.ForeignObjectRel.path_infos
django.db.models.fields.reverse_related.ManyToManyRel.identity
Expand Down
4 changes: 0 additions & 4 deletions scripts/stubtest/allowlist_todo_django50.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ django.contrib.gis.db.models.Field.generated
django.contrib.gis.db.models.FilteredRelation.relabeled_clone
django.contrib.gis.db.models.FilteredRelation.resolve_expression
django.contrib.gis.db.models.ForeignKey.cast_db_type
django.contrib.gis.db.models.ForeignObjectRel.get_joining_fields
django.contrib.gis.db.models.Func.allowed_default
django.contrib.gis.db.models.Lookup.allowed_default
django.contrib.gis.db.models.Prefetch.get_current_querysets
Expand Down Expand Up @@ -40,7 +39,6 @@ django.db.models.Field.generated
django.db.models.FilteredRelation.relabeled_clone
django.db.models.FilteredRelation.resolve_expression
django.db.models.ForeignKey.cast_db_type
django.db.models.ForeignObjectRel.get_joining_fields
django.db.models.Func.allowed_default
django.db.models.Lookup.allowed_default
django.db.models.Prefetch.get_current_querysets
Expand All @@ -55,12 +53,10 @@ django.db.models.expressions.When.allowed_default
django.db.models.fields.Field._get_flatchoices
django.db.models.fields.Field.generated
django.db.models.fields.related.ForeignKey.cast_db_type
django.db.models.fields.related.ForeignObjectRel.get_joining_fields
django.db.models.fields.related.ForwardManyToOneDescriptor.get_prefetch_querysets
django.db.models.fields.related.ReverseOneToOneDescriptor.get_prefetch_querysets
django.db.models.fields.related_descriptors.ForwardManyToOneDescriptor.get_prefetch_querysets
django.db.models.fields.related_descriptors.ReverseOneToOneDescriptor.get_prefetch_querysets
django.db.models.fields.reverse_related.ForeignObjectRel.get_joining_fields
django.db.models.functions.Now.as_oracle
django.db.models.functions.datetime.Now.as_oracle
django.db.models.lookups.Lookup.allowed_default
Expand Down
Loading