-
-
Notifications
You must be signed in to change notification settings - Fork 485
5.0: Update django.contrib.postgres
#2078
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
Merged
sobolevn
merged 2 commits into
typeddjango:master
from
sudosubin:feature/5.0-django.contrib.postgres
Apr 20, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
class OrderableAggMixin: ... | ||
from collections.abc import Sequence | ||
from typing import Any | ||
|
||
from django.db.backends.base.base import BaseDatabaseWrapper | ||
from django.db.models.expressions import BaseExpression, Combinable, Expression, OrderByList | ||
from django.db.models.sql.compiler import SQLCompiler, _AsSqlType | ||
from typing_extensions import Self | ||
|
||
class OrderableAggMixin: | ||
order_by: OrderByList | ||
def __init__( | ||
self, *expressions: BaseExpression | Combinable | str, ordering: Sequence[str] = ..., **extra: Any | ||
) -> None: ... | ||
def resolve_expression(self, *args: Any, **kwargs: Any) -> Self: ... | ||
def get_source_expressions(self) -> list[Expression]: ... | ||
def set_source_expressions(self, exprs: Sequence[Combinable]) -> None: ... | ||
def as_sql(self, compiler: SQLCompiler, connection: BaseDatabaseWrapper) -> _AsSqlType: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
from django.db.backends.base.base import BaseDatabaseWrapper | ||
from django.db.models.fields import CharField, EmailField, TextField | ||
|
||
class CIText: ... | ||
class CIText: | ||
def get_internal_type(self) -> str: ... | ||
def db_type(self, connection: BaseDatabaseWrapper) -> str: ... | ||
|
||
class CICharField(CIText, CharField): ... | ||
class CIEmailField(CIText, EmailField): ... | ||
class CITextField(CIText, TextField): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
from django.db.models import JSONField as BuiltinJSONField | ||
from django.db.models.fields.json import KeyTextTransform as BuiltinKeyTextTransform | ||
from django.db.models.fields.json import KeyTransform as BuiltinKeyTransform | ||
|
||
# All deprecated | ||
class JSONField(BuiltinJSONField): ... | ||
class KeyTransform(BuiltinKeyTransform): ... | ||
class KeyTextTransform(BuiltinKeyTextTransform): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
from .array import * | ||
from .hstore import * | ||
from .jsonb import * | ||
from .ranges import * | ||
from .array import SimpleArrayField as SimpleArrayField | ||
from .array import SplitArrayField as SplitArrayField | ||
from .array import SplitArrayWidget as SplitArrayWidget | ||
from .hstore import HStoreField as HStoreField | ||
from .ranges import BaseRangeField as BaseRangeField | ||
from .ranges import DateRangeField as DateRangeField | ||
from .ranges import DateTimeRangeField as DateTimeRangeField | ||
from .ranges import DecimalRangeField as DecimalRangeField | ||
from .ranges import HiddenRangeWidget as HiddenRangeWidget | ||
from .ranges import IntegerRangeField as IntegerRangeField | ||
from .ranges import RangeWidget as RangeWidget |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from typing import Any | ||
|
||
def get_hstore_oids(connection_alias: str) -> tuple[Any, ...]: ... | ||
def get_citext_oids(connection_alias: str) -> tuple[Any, ...]: ... | ||
def get_type_oids(connection_alias: str, type_name: str) -> tuple[tuple[Any, ...], tuple[Any, ...]]: ... | ||
def get_hstore_oids(connection_alias: str) -> tuple[tuple[Any, ...], tuple[Any, ...]]: ... | ||
def get_citext_oids(connection_alias: str) -> tuple[tuple[Any, ...], tuple[Any, ...]]: ... | ||
def register_type_handlers(connection: Any, **kwargs: Any) -> None: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sobolevn @sudosubin this is still an instance though isn't it?
https://github.com/django/django/blob/40a60d589e1d0d290c3b79c7e97d9cd0c94e52e3/django/contrib/postgres/fields/ranges.py#L65