#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 Mariusz Felisiak):

 Replying to [comment:8 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` shim for `CheckExpression.check` that returns
 `self.condition` and raise a deprecation warning
 > 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
 `_check_constraints` call into the newly instated `BaseConstraint.check`
 method and take the opportunity to document it.

 Sounds like a plan 👍
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35234#comment:9>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018dd78209da-ac6a279a-0edd-41f0-b594-1c9420ac9a76-000000%40eu-central-1.amazonses.com.

Reply via email to