Re: [Django] #34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group on" on MySQL/MariaDB.

2023-11-20 Thread Django
#34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group 
on"
on MySQL/MariaDB.
-+-
 Reporter:  Matthew Somerville   |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak):

 Agreed, let's document it.

-- 
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/0107018bf0b2c978-df172a1b-8957-4e45-b230-0202382a8dfd-00%40eu-central-1.amazonses.com.


Re: [Django] #34900: Python 3.13 compatibility.

2023-11-20 Thread Django
#34900: Python 3.13 compatibility.
-+-
 Reporter:  Mariusz Felisiak |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Core (Other) |  Version:  4.2
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by GitHub ):

 In [changeset:"6af83d2ee631afaec8bb018b81b2eba62a0524c2" 6af83d2e]:
 {{{
 #!CommitTicketReference repository=""
 revision="6af83d2ee631afaec8bb018b81b2eba62a0524c2"
 Refs #34900 -- Skipped argon2-cffi requirement on daily builds for Python
 3.13.
 }}}

-- 
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/0107018bf0a89fbf-e783ee0b-3b3c-4fca-b4d2-8812facf388f-00%40eu-central-1.amazonses.com.


Re: [Django] #34981: Promote `--pair` and `--bisect` from `runtest.py` to be available as flags for the Django `test` command

2023-11-20 Thread Django
#34981: Promote `--pair` and `--bisect` from `runtest.py` to be available as 
flags
for the Django `test` command
---+
 Reporter:  Natalia Bidart |Owner:  yushan
 Type:  New feature|   Status:  assigned
Component:  Testing framework  |  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Tim Graham):

 * type:  Uncategorized => New feature
 * easy:  1 => 0


Comment:

 Looking at how intertwined the code for these options is with other code
 in `runtests.py` (even
 
[https://github.com/django/django/blob/00a950f923435188a6c1d4ccdcb42c37cdc3976a/tests/runtests.py#L509
 hardcoding certain Django tests apps]), I doubt this is "easy pickings."

-- 
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/0107018bef8b2add-c41c1ad0-2345-447f-b182-fe89438e8d57-00%40eu-central-1.amazonses.com.


Re: [Django] #34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group on" on MySQL/MariaDB.

2023-11-20 Thread Django
#34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group 
on"
on MySQL/MariaDB.
-+-
 Reporter:  Matthew Somerville   |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by David Sanders):

 Replying to [comment:4 Simon Charette]:
 > 1. Revert the changes made in 041551d716b69ee7c81199eee86a2d10a72e15ab
 while making `allows_group_by_pk` based on the absence of
 `ONLY_FULL_GROUP_BY`. Note that this won't resolve the aggregation over
 the annotation of a dependant subquery but will restore the usage of
 `RawSQL` for aggregation on MySQL only when `ONLY_FULL_GROUP_BY` is
 disabled.
 > 2. 1 + adjustments to the `allows_group_by_pk` to special case dependant
 subquery annotations
 > 3. Adjust the 4.2 existing release notes about this change to better
 communicate that this version of Django removed support for doing `RawSQL`
 aggregations on MySQL and that they should use proper expressions instead
 going forward.

 We could also have a user-definable attribute `RawSQL.contains_aggregates`
 though I think that's making things too complex.

 Option 3 sounds good 

-- 
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/0107018bef38fedd-d4025cfe-cfb8-4d34-9b9a-0f776117a129-00%40eu-central-1.amazonses.com.


Re: [Django] #34981: Promote `--pair` and `--bisect` from `runtest.py` to be available as flags for the Django `test` command

2023-11-20 Thread Django
#34981: Promote `--pair` and `--bisect` from `runtest.py` to be available as 
flags
for the Django `test` command
---+
 Reporter:  Natalia Bidart |Owner:  yushan
 Type:  Uncategorized  |   Status:  assigned
Component:  Testing framework  |  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+
Changes (by yushan):

 * owner:  nobody => yushan
 * status:  new => assigned


-- 
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/0107018bef304866-2a6d145b-2e01-49c4-8e83-013e4d0b7475-00%40eu-central-1.amazonses.com.


Re: [Django] #34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group on" on MySQL/MariaDB.

2023-11-20 Thread Django
#34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group 
on"
on MySQL/MariaDB.
-+-
 Reporter:  Matthew Somerville   |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 > I get a lot of 1055 errors, even with a query that's only e.g.
 `Play.objects.annotate(Count('authors'))`, without any `RawSQL`, I get
 `(1055, "'theatricalia.plays_play.title' isn't in GROUP BY")`, but assume
 that's my issue somehow.

 That's interesting. If it's happening for models of the form

 {{{#!python
 class Author(models.Model):
 pass

 class Play(models.Model):
 title = models.CharField()
 authors = models.ManyToManyField(Author)
 }}}

 I would expect `Play.objects.annotate(Count('authors'))` to generate

 {{{#!sql
 SELECT play.id, play.name, COUNT(author.id)
 FROM play
 LEFT JOIN play_authors ON (play_authors.play_id = play.id)
 LEFT JOIN author ON (play_authors.author_id = author.id)
 GROUP BY play.id
 }}}

 And by [https://dev.mysql.com/doc/refman/8.0/en/group-by-handling.html
 MySQL docs]

 > MySQL implements detection of functional dependence. If the
 `ONLY_FULL_GROUP_BY` SQL mode is enabled (which it is by default), MySQL
 rejects queries for which the select list, HAVING condition, or ORDER BY
 list refer to nonaggregated columns that are neither named in the `GROUP
 BY` clause '''nor are functionally dependent on them'''.

 So in this case `play.name` ''is'' functionally dependant on `play.id` (as
 it's the primary key of `play`) so if you're using a version of MySQL
 supported on Django 4.2 we'd definitely like to learn more about it as
 it's unexpected.

-- 
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/0107018bee70043c-95596d93-f827-45c3-a0a5-9cb75287f760-00%40eu-central-1.amazonses.com.


Re: [Django] #34900: Python 3.13 compatibility.

2023-11-20 Thread Django
#34900: Python 3.13 compatibility.
-+-
 Reporter:  Mariusz Felisiak |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Core (Other) |  Version:  4.2
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by GitHub ):

 In [changeset:"00a950f923435188a6c1d4ccdcb42c37cdc3976a" 00a950f9]:
 {{{
 #!CommitTicketReference repository=""
 revision="00a950f923435188a6c1d4ccdcb42c37cdc3976a"
 Refs #34900 -- Added Python 3.13 to daily builds.
 }}}

-- 
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/0107018bee1432f3-a1bd873a-6a0d-4dcd-8958-4f4c5aa1d816-00%40eu-central-1.amazonses.com.


Re: [Django] #34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group on" on MySQL/MariaDB.

2023-11-20 Thread Django
#34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group 
on"
on MySQL/MariaDB.
-+-
 Reporter:  Matthew Somerville   |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Matthew Somerville):

 Given the same query does already use `Min()`, as quoted, I am at a loss
 as to why I wasn't using it in the other part! Thanks for the
 investigation; an addition to the 4.2 release notes explaining the change
 further (I did read those, but only saw the reference to changes in
 "third-party database backends") would be welcome, thank you.

 With the change to your first option¹, my code passes on Django 4.2 fine
 with `ONLY_FULL_GROUP_BY` turned off, thank you; turning that option on I
 get a lot of 1055 errors, even with a query that's only e.g.
 `Play.objects.annotate(Count('authors'))`, without any RawSQL, I get
 `(1055, "'theatricalia.plays_play.title' isn't in GROUP BY")`, but assume
 that's my issue somehow.

 ¹ If you're interested, regarding your second/third code change options,
 press_date is a DateField but start_date/end_date are
 ApproximateDateFields from my https://pypi.org/project/django-date-
 extensions/ so that becomes a bit more complex.

-- 
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/0107018bedf49b15-e93d4778-c3da-432d-ba83-d4e317590783-00%40eu-central-1.amazonses.com.


Re: [Django] #34981: Promote `--pair` and `--bisect` from `runtest.py` to be available as flags for the Django `test` command

2023-11-20 Thread Django
#34981: Promote `--pair` and `--bisect` from `runtest.py` to be available as 
flags
for the Django `test` command
---+
 Reporter:  Natalia Bidart |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Testing framework  |  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+
Changes (by Claude Paroz):

 * stage:  Unreviewed => Accepted


Comment:

 Makes sense!

-- 
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/0107018bede563a1-173f03cd-8fd8-4fe2-8e81-7e88478faaf3-00%40eu-central-1.amazonses.com.


Re: [Django] #34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group on" on MySQL/MariaDB.

2023-11-20 Thread Django
#34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group 
on"
on MySQL/MariaDB.
-+-
 Reporter:  Matthew Somerville   |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Natalia Bidart):

 Replying to [comment:4 Simon Charette]:
 > I could see us go three ways about dealing with this issue
 >
 > 1. Revert the changes made in 041551d716b69ee7c81199eee86a2d10a72e15ab
 while making `allows_group_by_pk` based on the absence of
 `ONLY_FULL_GROUP_BY`. Note that this won't resolve the aggregation over
 the annotation of a dependant subquery but will restore the usage of
 `RawSQL` for aggregation on MySQL only when `ONLY_FULL_GROUP_BY` is
 disabled.
 > 2. 1 + adjustments to the `allows_group_by_pk` to special case dependant
 subquery annotations
 > 3. Adjust the 4.2 existing release notes about this change to better
 communicate that this version of Django removed support for doing `RawSQL`
 aggregations on MySQL and that they should use proper expressions instead
 going forward.

 Given your rationale and considering that there are multiple workarounds
 as you proposed, I'm also in favor of option 3.

-- 
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/0107018bedd0ef2c-9d64ddf7-94a9-40df-9c60-09faf916dbb3-00%40eu-central-1.amazonses.com.


[Django] #34981: Promote `--pair` and `--bisect` from `runtest.py` to be available as flags for the Django `test` command

2023-11-20 Thread Django
#34981: Promote `--pair` and `--bisect` from `runtest.py` to be available as 
flags
for the Django `test` command
-+
   Reporter:  Natalia Bidart |  Owner:  nobody
   Type:  Uncategorized  | Status:  new
  Component:  Testing framework  |Version:  dev
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  0  |
-+
 Following [https://forum.djangoproject.com/t/django-fellow-report-
 natalia/20942/37 a recent conversation in the forum], it was suggested
 that we promote the flags `--pair` and `--bisect` to be available in the
 Django `test` command. Currently these are only implemented in the Django
 custom `runtests.py` helper script.

-- 
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/0107018bed94b30d-6b83c6bb-6119-4942-af95-a2f1fcc350d8-00%40eu-central-1.amazonses.com.


Re: [Django] #34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group on" on MySQL/MariaDB.

2023-11-20 Thread Django
#34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group 
on"
on MySQL/MariaDB.
-+-
 Reporter:  Matthew Somerville   |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 See #26602 ''Provide a way to manage grouping with RawSQL'' which was
 closed because of a justified use case.

 I would say that the same can be said about this ticket as the reported
 problem can be fixed in multiple ways with the provided ORM interfaces.

 The most obvious and non-invasive one is to use `Min(RawSQL(...))` instead

 {{{#!python
 annotate(
 best_date=Min(
 RawSQL(
 'IFNULL(productions_place.press_date,
 IF(productions_place.end_date!="", productions_place.end_date,
 productions_place.start_date))',
 (),
 ),
 )
 )
 }}}

 a second one is to use expressions entirely

 {{{#!python
 annotate(best_date=Min(Coalesce("press_date", Case(When(end_date="",
 then=F("start_date")), default=F("end_date"
 }}}

 a third one, assuming the user wants to stick to `IF` and `IFNULL`

  {{{#!python
 from django.db.models import Func

 class If(Func):
 function = "IF"

 class IfNull(Func):
 function = "IFNULL"


 annotate(best_date=Min(
 IfNull("press_date", If(end_date="", "start_date", "end_date"))
 ))
 }}}

 -

 > This one's interesting because we can't dig into RawSQL to determine
 whether it's valid in a GROUP BY or not.

 That's right David, it's the crux of the issue.

 The reason why 041551d716b69ee7c81199eee86a2d10a72e15ab broke the reported
 use that is that prior to this change the ORM supported a non-standard
 feature of MySQL [https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html
 disabled in recent versions] that allowed grouping solely by the primary
 key of the first entry in `FROM`. It's important to note that using
 `RawSQL` to aggregate was only working on MySQL due to this feature and
 never worked on any of the other backends that follow the functional
 dependency detection in `GROUP BY` clauses as specified by the `SQL:1999`
 standard.

 The nail in the coffin of this feature was went it was discovered that it
 had a peculiarity when dealing with subqueries #31331 that would have
 required a significant amount of work to get working.

 I could see us go three ways about dealing with this issue

 1. Revert the changes made in 041551d716b69ee7c81199eee86a2d10a72e15ab
 while making `allows_group_by_pk` based on the absence of
 `ONLY_FULL_GROUP_BY`. Note that this won't resolve the aggregation over
 the annotation of a dependant subquery but will restore the usage of
 `RawSQL` for aggregation on MySQL only when `ONLY_FULL_GROUP_BY` is
 disabled.
 2. 1 + adjustments to the `allows_group_by_pk` to special case dependant
 subquery annotations
 3. Adjust the 4.2 existing release notes about this change to let them
 know that this version of Django removed support for doing `RawSQL`
 aggregations on MySQL and that they should use proper expressions instead
 going forward.

 Due to lack of demonstration that some aggregates or window function
 cannot be expressed using the advanced ORM primitives, that
 non-`ONLY_FULL_GROUP_BY` model is a non standard MySQL feature that is not
 enabled by default since 8.0, and that this change happen to standardize
 the usage of `RawSQL` for aggregations on all backends I'd be inclined to
 go with 3.

-- 
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/0107018bed53dd79-516330ee-b1cd-4e47-921f-109770bcb1c8-00%40eu-central-1.amazonses.com.


Re: [Django] #34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group on" on MySQL/MariaDB.

2023-11-20 Thread Django
#34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group 
on"
on MySQL/MariaDB.
-+-
 Reporter:  Matthew Somerville   |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * owner:  nobody => Simon Charette
 * status:  new => assigned


-- 
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/0107018bed18c317-e9578bc2-7186-48de-a8e1-dc34beebedd7-00%40eu-central-1.amazonses.com.


Re: [Django] #14810: Admin inline templates need blocks

2023-11-20 Thread Django
#14810: Admin inline templates need blocks
-+-
 Reporter:  Simon Meers  |Owner:
 |  abdulrahman
 Type:  New feature  |   Status:  closed
Component:  contrib.admin|  Version:  dev
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  template, block, | Triage Stage:
  inheritance|  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:  assigned => closed
 * needs_better_patch:  1 => 0
 * needs_docs:  1 => 0
 * has_patch:  1 => 0
 * resolution:   => wontfix
 * stage:  Accepted => Unreviewed


Comment:

 Do to the lack of any replies [https://forum.djangoproject.com/t/adding-
 blocks-to-the-stacked-tabular-inline-templates/21969 on the forum], only a
 few replies in the ticket, and strong doubts as to whether this is really
 useful, I'll close the ticket as "wontfix".

 `title` can already be customized with
 `verbose_name`/`verbose_name_plural` and using `field-elements`/`table-
 body`/`table-headers` will force users to rewrite almost the entire
 template, so they are not very useful either.

-- 
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/0107018becab989b-96c082ae-02ca-4567-a8c9-4d8bb6aa6c02-00%40eu-central-1.amazonses.com.


Re: [Django] #34980: Change migration operation dependencies to namedtuples.

2023-11-20 Thread Django
#34980: Change migration operation dependencies to namedtuples.
-+-
 Reporter:  Mariusz Felisiak |Owner:  Mariusz
 Type:   |  Felisiak
  Cleanup/optimization   |   Status:  assigned
Component:  Migrations   |  Version:  dev
 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
-+-
Changes (by Carlton Gibson):

 * stage:  Unreviewed => Accepted


-- 
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/0107018bec344f38-86f72999-9e99-421d-a3e2-cdb103db77f3-00%40eu-central-1.amazonses.com.


Re: [Django] #34980: Change migration operation dependencies to namedtuples. (was: Changed migration operation dependencies to namedtuples.)

2023-11-20 Thread Django
#34980: Change migration operation dependencies to namedtuples.
-+-
 Reporter:  Mariusz Felisiak |Owner:  Mariusz
 Type:   |  Felisiak
  Cleanup/optimization   |   Status:  assigned
Component:  Migrations   |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

-- 
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/0107018bec2dfb5f-18feefc4-c36f-4065-8b3e-64dc8f0a0f6a-00%40eu-central-1.amazonses.com.


Re: [Django] #34980: Changed migration operation dependencies to namedtuples.

2023-11-20 Thread Django
#34980: Changed migration operation dependencies to namedtuples.
-+-
 Reporter:  Mariusz Felisiak |Owner:  Mariusz
 Type:   |  Felisiak
  Cleanup/optimization   |   Status:  assigned
Component:  Migrations   |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * has_patch:  0 => 1


Comment:

 I've been thinking about changing this for some time, and I'm
 [https://github.com/django/django/pull/16905#discussion_r1306500610 not
 the only one], so I gave it a try.

 [https://github.com/django/django/pull/17494 PR]

-- 
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/0107018bec2d3cf1-502e3365-1b97-42f1-a027-034bd6e0d6ee-00%40eu-central-1.amazonses.com.


[Django] #34980: Changed migration operation dependencies to namedtuples.

2023-11-20 Thread Django
#34980: Changed migration operation dependencies to namedtuples.
-+-
   Reporter:  Mariusz|  Owner:  Mariusz Felisiak
  Felisiak   |
   Type: | Status:  assigned
  Cleanup/optimization   |
  Component: |Version:  dev
  Migrations |
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Using `namedtuple`s and `Enum`s should make the migration autodetector
 more readable and maintainable.

-- 
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/0107018bec2c8f1a-1002b200-5e5e-411f-80aa-8b0a9a122912-00%40eu-central-1.amazonses.com.


Re: [Django] #34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group on" on MySQL/MariaDB.

2023-11-20 Thread Django
#34978: Annotating through an aggregate with RawSQL() raises 1056 "Can't group 
on"
on MySQL/MariaDB.
-+-
 Reporter:  Matthew Somerville   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by David Sanders):

 Failing test in case that helps:

 {{{
 --- a/tests/aggregation/tests.py
 +++ b/tests/aggregation/tests.py
 @@ -2135,6 +2135,39 @@ class AggregateTestCase(TestCase):
  )
  self.assertEqual(list(author_qs), [337])

 +def test_annotate_raw_expression(self):
 +qs = (
 +Book.objects.values("publisher")
 +.annotate(min_price=Min("price"))
 +.annotate(max_price=RawSQL("MAX(price)", params=[]))
 +.values("publisher__name", "min_price", "max_price")
 +)
 +self.assertEqual(
 +list(qs),
 +[
 +{
 +"max_price": Decimal("30.00"),
 +"min_price": Decimal("29.69"),
 +"publisher__name": "Apress",
 +},
 +{
 +"max_price": Decimal("23.09"),
 +"min_price": Decimal("23.09"),
 +"publisher__name": "Sams",
 +},
 +{
 +"max_price": Decimal("82.80"),
 +"min_price": Decimal("29.69"),
 +"publisher__name": "Prentice Hall",
 +},
 +{
 +"max_price": Decimal("75.00"),
 +"min_price": Decimal("75.00"),
 +"publisher__name": "Morgan Kaufmann",
 +},
 +],
 +)
 +

  class AggregateAnnotationPruningTests(TestCase):
  @classmethod
 }}}

 This one's interesting because we can't dig into RawSQL to determine
 whether it's valid in a GROUP BY or not.

-- 
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/0107018bebfa65d9-c5674800-1c9a-45f3-b4c6-e7be178f2aba-00%40eu-central-1.amazonses.com.