Skip to content

Commit

Permalink
Implement Django 4.2 deprecations (#1523)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexerson authored Jun 5, 2023
1 parent 0ea2222 commit c50aefb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion django-stubs/db/backends/base/features.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class BaseDatabaseFeatures:
minimum_database_version: tuple[int, ...] | None
gis_enabled: bool
allows_group_by_lob: bool
allows_group_by_pk: bool
allows_group_by_selected_pks: bool
empty_fetchmany_value: Sequence[Any]
update_can_self_select: bool
Expand Down
5 changes: 2 additions & 3 deletions django-stubs/db/models/expressions.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class BaseExpression:
def get_transform(self, name: str) -> type[Transform] | None: ...
def relabeled_clone(self: Self, change_map: dict[str | None, str]) -> Self: ...
def copy(self: Self) -> Self: ...
def get_group_by_cols(self: Self, alias: str | None = ...) -> list[Self]: ...
def get_group_by_cols(self: Self) -> list[Self]: ...
def get_source_fields(self) -> list[Field | None]: ...
def asc(
self,
Expand Down Expand Up @@ -225,8 +225,7 @@ class Subquery(BaseExpression, Combinable):
def __init__(self, queryset: Query | QuerySet, output_field: Field | None = ..., **extra: Any) -> None: ...

class Exists(Subquery):
negated: bool
def __init__(self, queryset: Query | QuerySet, negated: bool = ..., **kwargs: Any) -> None: ...
def __init__(self, queryset: Query | QuerySet, **kwargs: Any) -> None: ...
def __invert__(self) -> Exists: ...

class OrderBy(Expression):
Expand Down
2 changes: 1 addition & 1 deletion django-stubs/db/models/lookups.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Lookup(Generic[_T]):
def process_rhs(self, compiler: SQLCompiler, connection: BaseDatabaseWrapper) -> _AsSqlType: ...
def rhs_is_direct_value(self) -> bool: ...
def relabeled_clone(self: Self, relabels: Mapping[str, str]) -> Self: ...
def get_group_by_cols(self, alias: str | None = ...) -> list[Expression]: ...
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
Expand Down
2 changes: 0 additions & 2 deletions django-stubs/http/multipartparser.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,3 @@ class BoundaryIter:
class Parser:
def __init__(self, stream: LazyStream, boundary: bytes) -> None: ...
def __iter__(self) -> Iterator[tuple[str, dict[str, tuple[str, dict[str, bytes | str]]], LazyStream]]: ...

def parse_header(line: bytes) -> tuple[str, dict[str, bytes]]: ...

0 comments on commit c50aefb

Please sign in to comment.