Skip to content

Commit

Permalink
5.0: Update django.db.models.sql.query (#2172)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeHyuckSa authored May 21, 2024
1 parent d678774 commit c062944
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
10 changes: 4 additions & 6 deletions django-stubs/db/models/sql/query.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,12 @@ class Query(BaseExpression):
can_reuse: set[str] | None = ...,
allow_joins: bool = ...,
split_subq: bool = ...,
reuse_with_filtered_relation: bool = ...,
check_filterable: bool = ...,
update_join_types: bool = ...,
) -> tuple[WhereNode, Iterable[str]]: ...
def add_filter(self, filter_clause: tuple[str, Any]) -> None: ...
def add_q(self, q_object: Q) -> None: ...
def build_where(self, filter_expr: Q | Expression | dict[str, str] | tuple[str, Any]) -> WhereNode: ...
def build_filtered_relation_q(
self, q_object: Q, reuse: set[str], branch_negated: bool = ..., current_negated: bool = ...
) -> WhereNode: ...
def add_filtered_relation(self, filtered_relation: FilteredRelation, alias: str) -> None: ...
def setup_joins(
self,
Expand All @@ -140,7 +137,6 @@ class Query(BaseExpression):
alias: str,
can_reuse: set[str] | None = ...,
allow_many: bool = ...,
reuse_with_filtered_relation: bool = ...,
) -> JoinInfo: ...
def trim_joins(
self, targets: tuple[Field, ...], joins: list[str], path: list[PathInfo]
Expand Down Expand Up @@ -201,7 +197,9 @@ class Query(BaseExpression):
def build_lookup(self, lookups: Sequence[str], lhs: Expression | Query, rhs: Any) -> Lookup: ...
def try_transform(self, lhs: Expression | Query, name: str) -> Transform: ...
def join(
self, join: BaseTable | Join, reuse: str | None = ..., reuse_with_filtered_relation: bool = ...
self,
join: BaseTable | Join,
reuse: str | None = ...,
) -> str: ...

class JoinPromoter:
Expand Down
6 changes: 0 additions & 6 deletions scripts/stubtest/allowlist_todo_django50.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ 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.lookups.Lookup.allowed_default
django.db.models.sql.Query.build_filtered_relation_q
django.db.models.sql.Query.join
django.db.models.sql.Query.setup_joins
django.db.models.sql.query.Query.build_filtered_relation_q
django.db.models.sql.query.Query.join
django.db.models.sql.query.Query.setup_joins
django.template.autoreload

# Django + Oracle (new errors after 5.0.5 update)
Expand Down

0 comments on commit c062944

Please sign in to comment.