mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #34355 -- Deprecated passing positional arguments to BaseConstraint.
This commit is contained in:
committed by
Mariusz Felisiak
parent
31cd2852cb
commit
ad18a0102c
@@ -18,6 +18,9 @@ details on these changes.
|
||||
* The ``DjangoDivFormRenderer`` and ``Jinja2DivFormRenderer`` transitional form
|
||||
renderers will be removed.
|
||||
|
||||
* Support for passing positional arguments to ``BaseConstraint`` will be
|
||||
removed.
|
||||
|
||||
.. _deprecation-removed-in-5.1:
|
||||
|
||||
5.1
|
||||
|
||||
@@ -48,12 +48,16 @@ option.
|
||||
``BaseConstraint``
|
||||
==================
|
||||
|
||||
.. class:: BaseConstraint(name, violation_error_message=None)
|
||||
.. class:: BaseConstraint(*, name, violation_error_message=None)
|
||||
|
||||
Base class for all constraints. Subclasses must implement
|
||||
``constraint_sql()``, ``create_sql()``, ``remove_sql()`` and
|
||||
``validate()`` methods.
|
||||
|
||||
.. deprecated:: 5.0
|
||||
|
||||
Support for passing positional arguments is deprecated.
|
||||
|
||||
All constraints have the following parameters in common:
|
||||
|
||||
``name``
|
||||
|
||||
@@ -267,6 +267,10 @@ Miscellaneous
|
||||
* The ``DjangoDivFormRenderer`` and ``Jinja2DivFormRenderer`` transitional form
|
||||
renderers are deprecated.
|
||||
|
||||
* Passing positional arguments ``name`` and ``violation_error_message`` to
|
||||
:class:`~django.db.models.BaseConstraint` is deprecated in favor of
|
||||
keyword-only arguments.
|
||||
|
||||
Features removed in 5.0
|
||||
=======================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user