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.sql.query.Query #2172

Merged
merged 2 commits into from
May 21, 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
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 @@ -51,12 +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.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
Loading