Re: [Django] #32770: Add system check for django.contrib.postgres in INSTALLED_APPS when using OpClass().

2024-05-05 Thread Django
#32770: Add system check for django.contrib.postgres in INSTALLED_APPS when 
using
OpClass().
-+-
 Reporter:  Seth Yastrov |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  3.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * cc: Simon Charette (added)

Comment:

 In the light of continuous reports of users running into this qwirk
 (#35431 being the latest one) I wonder if we could

 1. Have all fields defined in `contrib.postgres` have their `check` method
 make sure that `'django.contrib.postgres' in INSTALLED_APPS`
 2. Adjust `Model._check_indexes` to do something similar to what we did
 with `Constraint` check delegation in
 0fb104dda287431f5ab74532e45e8471e22b58c8
 3. Have both `contrib.postgres` indexes and constraints perform the same
 `'django.contrib.postgres' in INSTALLED_APPS` check

 Thoughts?
-- 
Ticket URL: 
Django 
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/0107018f49e285df-aa009afb-9715-4cfb-a0cd-d9217bfd8b81-00%40eu-central-1.amazonses.com.


Re: [Django] #32770: Add system check for django.contrib.postgres in INSTALLED_APPS when using OpClass(). (was: GinIndex with OpClass and Cast results in Postgres syntax error in migration when django

2021-05-20 Thread Django
#32770: Add system check for django.contrib.postgres in INSTALLED_APPS when 
using
OpClass().
-+-
 Reporter:  Seth Yastrov |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  3.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * type:  Bug => New feature
 * resolution:   => needsinfo


Comment:

 > Therefore I'm reopening the issue, and hoping that this check can be
 made, as despite this requirement being mentioned in the docs, the current
 behavior is quite unintuitive.

 It would be really complicated. First of all, we would need to mix-up
 logic from a contrib app and the ORM. Secondly `OpClass()` don't need to
 be the topmost expression, so the flatten list of expression would be
 necessary. Thirdly we don't have similar checks for fields from
 `django.contrib.postgres` app which also require including
 `'django.contrib.postgres'` in `INSTALLED_APPS`, e.g. `HStoreField`. I
 don't think it's worth complexity, however we can reconsider this decision
 if someone provides PoC.

-- 
Ticket URL: 
Django 
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/066.fdb222d8c2c9475d2a4a81594975c174%40djangoproject.com.