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.query_utils #2165

Merged
merged 3 commits into from
May 19, 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
4 changes: 2 additions & 2 deletions django-stubs/db/models/query_utils.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class FilteredRelation:
relation_name: str
alias: str | None
condition: Q
path: list[str]
def __init__(self, relation_name: str, *, condition: Q = ...) -> None: ...
def clone(self) -> FilteredRelation: ...
def resolve_expression(self, *args: Any, **kwargs: Any) -> None: ...
def relabeled_clone(self, change_map: dict[str, str]) -> FilteredRelation: ...
def resolve_expression(self, query: Query, reuse: set[str], *args: Any, **kwargs: Any) -> FilteredRelation: ...
def as_sql(self, compiler: SQLCompiler, connection: BaseDatabaseWrapper) -> _AsSqlType: ...
1 change: 1 addition & 0 deletions scripts/stubtest/allowlist_todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,7 @@ django.db.models.query.prefetch_one_level
django.db.models.query_utils.InvalidQuery
django.db.models.query_utils.Q.XOR
django.db.models.query_utils.Q.resolve_expression
django.db.models.query_utils.Q.identity
django.db.models.query_utils.RegisterLookupMixin._unregister_lookup
django.db.models.query_utils.RegisterLookupMixin.get_class_lookups
django.db.models.query_utils.RegisterLookupMixin.get_instance_lookups
Expand Down
7 changes: 0 additions & 7 deletions scripts/stubtest/allowlist_todo_django50.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ django.contrib.gis.db.models.Case.allowed_default
django.contrib.gis.db.models.ExpressionWrapper.allowed_default
django.contrib.gis.db.models.F.allowed_default
django.contrib.gis.db.models.Field._get_flatchoices
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.Func.allowed_default
django.contrib.gis.db.models.Lookup.allowed_default
Expand All @@ -33,8 +31,6 @@ django.db.models.Case.allowed_default
django.db.models.ExpressionWrapper.allowed_default
django.db.models.F.allowed_default
django.db.models.Field._get_flatchoices
django.db.models.FilteredRelation.relabeled_clone
django.db.models.FilteredRelation.resolve_expression
django.db.models.ForeignKey.cast_db_type
django.db.models.Func.allowed_default
django.db.models.Lookup.allowed_default
Expand All @@ -55,9 +51,6 @@ django.db.models.fields.related_descriptors.ReverseOneToOneDescriptor.get_prefet
django.db.models.functions.Now.as_oracle
django.db.models.functions.datetime.Now.as_oracle
django.db.models.lookups.Lookup.allowed_default
django.db.models.query_utils.FilteredRelation.relabeled_clone
django.db.models.query_utils.FilteredRelation.resolve_expression
django.db.models.query_utils.Q.identity
django.db.models.sql.Query.build_filtered_relation_q
django.db.models.sql.Query.join
django.db.models.sql.Query.setup_joins
Expand Down
Loading