#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:6 Simon Charette]:
> > But then we have the dilemma of diverging from the kwarg check passed
to CheckConstraint.
>
> yeah that's the crux of the issue, what Mariusz was referring to is that
the attribute name is documented as the patch didn't suggest changing the
kwarg name.
>
> If we are going on the more explicit route I guess that `def
system_checks` would be the most unambiguous choice? I pushed a version of
the patch that opts to use `_check` for system checks as that maintains
the public contract on `ChekConstriant.check` but it doesn't lift the
ambiguity on the notion of ''check'' which might be warranted here to
avoid any confusion.
Yes, that's unfortunate. We will not be able to make it consistent without
a proper deprecation of some kind. We can
- deprecate `check()` for
[https://docs.djangoproject.com/en/5.0/topics/checks/#field-model-manager-
and-database-checks fields, models, model managers, and database
backends], and rename it to `system_check()`,
- deprecate `check` argument for `CheckConstraint` and rename it to the
`check_expression` or `condition`.
--
Ticket URL: <https://code.djangoproject.com/ticket/35234#comment:7>
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/0107018dcfe643bc-17ff4523-f05b-453d-bbc9-c5e0d99a918e-000000%40eu-central-1.amazonses.com.