1
0
mirror of https://github.com/django/django.git synced 2025-01-08 17:37:20 +00:00

Refs #35444 -- Deprecated contrib.postgres.OrderableAggMixin

This commit does not create any functional changes, but marks the
existing `OrderableAggMixin` class as deprecated so that developers
using it directly can be made aware of its future removal.
This commit is contained in:
Chris Muthig 2024-08-14 13:54:09 -06:00
parent 2ae778621b
commit a5b4c680f3
No known key found for this signature in database
GPG Key ID: 28E4EB85B5AB189A
3 changed files with 12 additions and 0 deletions

View File

@ -23,4 +23,10 @@ class OrderableAggMixin(_DeprecatedOrdering):
allow_order_by = True
def __init_subclass__(cls, /, *args, **kwargs):
warnings.warn(
"OrderableAggMixin is deprecated. Use Aggregate and allow_order_by "
"instead.",
category=RemovedInDjango61Warning,
stacklevel=1,
)
super().__init_subclass__(*args, **kwargs)

View File

@ -28,6 +28,9 @@ details on these changes.
* The ``django.contrib.postgres.aggregates.StringAgg`` class will be removed.
* The ``django.contrib.postgres.aggregates.mixins.OrderableAggMixin`` class
will be removed.
.. _deprecation-removed-in-6.0:
6.0

View File

@ -499,3 +499,6 @@ Miscellaneous
* The PostgreSQL ``StringAgg`` class is deprecated in favor of the generally
available ``StringAgg`` class.
* The PostgreSQL ``OrderableAggMixin`` is deprecated in favor of the
``order_by`` attribute now available on the ``Aggregate`` class.