#35234: ExclusionConstraint.expressions should be checked for foreign 
relationship
references
-------------------------------------+-------------------------------------
     Reporter:  Simon Charette       |                    Owner:  Simon
         Type:                       |  Charette
  Cleanup/optimization               |                   Status:  assigned
    Component:  contrib.postgres     |                  Version:  5.0
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):

 I have a slight inclination for the second option as it seems less
 disruptive? It involves a single method and `CheckConstraint.check` has
 been added quite more recently that all the other abstractions. So what
 about the following approach

 1. Store the attribute in `CheckExpression.condition` and allow either
 `condition` or `check` to be passed to `__init__`
 2. Raise a deprecation warning when `check` is provided.
 3. Add a `@property` deprecation shim for `CheckExpression.check` that
 returns `self.condition`
 4. Merge this patch that has `Model._check_constraints` call
 `BaseConstraint._check` for the time being to perform system checks
 5. When the deprecation period ends remove the shim and have the
 `_check_constraints` call into the newly instated `BaseConstraint.check`
 method and take the opportunity to document it.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35234#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018dd698d86c-4465a49e-3a48-4320-b9d4-f59a845837ef-000000%40eu-central-1.amazonses.com.

Reply via email to