Re: [Django] #34125: Limiting QuerySet crashes on union() with a single non-empty query

2022-10-27 Thread Django
#34125: Limiting QuerySet crashes on union() with a single non-empty query
-+-
 Reporter:  Stefan Hammer|Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Release blocker  |   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 Simon Charette):

 * has_patch:  0 => 1


-- 
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/010701841d01c911-e520483e-3c70-4365-b84a-d16b19228fa0-00%40eu-central-1.amazonses.com.


Re: [Django] #34112: Add async interface to Model

2022-10-27 Thread Django
#34112: Add async interface to Model
-+-
 Reporter:  Adam Johnson |Owner:  Bhuvnesh
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 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
-+-

Comment (by Bhuvnesh):

 Hi, i would like to work on this issue, just wanted to know if the
 approach will be same as in [https://code.djangoproject.com/ticket/33646
 #33646 ] i.e. using {{{sync_to_async}}}?

-- 
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/010701841cfa9a26-59f5a4c1-def0-4d09-974c-dcd4c0cd8b6d-00%40eu-central-1.amazonses.com.


Re: [Django] #34112: Add async interface to Model

2022-10-27 Thread Django
#34112: Add async interface to Model
-+-
 Reporter:  Adam Johnson |Owner:  Bhuvnesh
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 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 Bhuvnesh):

 * owner:  (none) => Bhuvnesh
 * 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/010701841cdc723b-9a425730-5d1f-486c-8d8a-271ce34afe55-00%40eu-central-1.amazonses.com.


Re: [Django] #34125: Limiting QuerySet crashes on union() with a single non-empty query

2022-10-27 Thread Django
#34125: Limiting QuerySet crashes on union() with a single non-empty query
-+-
 Reporter:  Stefan Hammer|Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (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 Mariusz Felisiak):

 * Attachment "test-34125.diff" added.

 Regression test.

-- 
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/010701841cb3cd26-af0111ea-efa7-4e52-8407-1d8200e1fa36-00%40eu-central-1.amazonses.com.


Re: [Django] #34125: Limiting QuerySet crashes on union() with a single non-empty query

2022-10-27 Thread Django
#34125: Limiting QuerySet crashes on union() with a single non-empty query
-+-
 Reporter:  Stefan Hammer|Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (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/010701841cb38b86-e957be9d-0d3f-4ef4-8e9e-ed76daff983c-00%40eu-central-1.amazonses.com.


Re: [Django] #34125: Limiting QuerySet crashes on union() with a single non-empty query

2022-10-27 Thread Django
#34125: Limiting QuerySet crashes on union() with a single non-empty query
-+-
 Reporter:  Stefan Hammer|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (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 Mariusz Felisiak):

 * cc: Simon Charette (added)
 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the report! I attached a regression test which generates the
 following SQL on PostgreSQL:
 {{{#!sql
   (SELECT "queries_number"."id",
   "queries_number"."num",
   "queries_number"."other_num",
   "queries_number"."another_num"
FROM "queries_number"
WHERE "queries_number"."num" <= 0
LIMIT 1)
 LIMIT 1;
 }}}



 Regression in 3d734c09ff0138441dfe0a59010435871d17950f.
 Reproduced at de2c2127b66e77a034c01c81753c5c08e651a5b4.

-- 
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/010701841cb2ef66-961e4611-ea7a-4cb8-a9eb-f4cf011fae09-00%40eu-central-1.amazonses.com.


Re: [Django] #34099: update_or_create() not saving data assigned in a model's save() method

2022-10-27 Thread Django
#34099: update_or_create() not saving data assigned in a model's save() method
-+-
 Reporter:  Phil Gyford  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (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 think it would still be worth to call out in the release notes as a
 possibly backwards incompatible change?

 Agreed. Ideally we'd have examples on how to properly override `save()` as
 well but a release note and maybe an `admonition` to the `update-or-
 create` / `versionchanged` could be valuable?

-- 
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/010701841bad11e9-6a9c60bb-f5b6-4cf4-81bf-0de6f91a056b-00%40eu-central-1.amazonses.com.


Re: [Django] #34125: Limiting QuerySet crashes on union() with a single non-empty query (was: Limitting QuerySet crashes on union() with a single non-empty query)

2022-10-27 Thread Django
#34125: Limiting QuerySet crashes on union() with a single non-empty query
-+-
 Reporter:  Stefan Hammer|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  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/010701841b738197-89b646f0-36d4-4c4f-897c-dbeea5db2649-00%40eu-central-1.amazonses.com.


Re: [Django] #34125: Limitting QuerySet crashes on union() with a single non-empty query

2022-10-27 Thread Django
#34125: Limitting QuerySet crashes on union() with a single non-empty query
-+-
 Reporter:  Stefan Hammer|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 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 bcail):

 * cc: bcail (added)


Comment:

 Using the following diff:
 {{{
 diff --git a/tests/queries/tests.py b/tests/queries/tests.py
 index 5163fc5cb1..31651df114 100644
 --- a/tests/queries/tests.py
 +++ b/tests/queries/tests.py
 @@ -3199,6 +3199,11 @@ class UnionTests(unittest.TestCase):
  )
  self.check_union(ObjectB, Q1, Q2)

 +def test_union_empty_queryset(self):
 +q1 = ObjectA.objects.all().order_by()
 +q2 = q1.union(ObjectA.objects.none())
 +print(q2.order_by()[:1])
 +

  class DefaultValuesInsertTest(TestCase):
  def test_no_extra_params(self):
 }}}

 git bisect says that 3d734c09ff0138441dfe0a59010435871d17950f is the first
 bad commit.

-- 
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/010701841b44a8f2-4d0fe833-a82e-40bb-a7ad-221e604cd1c2-00%40eu-central-1.amazonses.com.


Re: [Django] #34099: update_or_create() not saving data assigned in a model's save() method

2022-10-27 Thread Django
#34099: update_or_create() not saving data assigned in a model's save() method
-+-
 Reporter:  Phil Gyford  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (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 Florian Apolloner):

 Good point about `only`, that makes me feel a bit better about a
 documentation only patch. I think it would still be worth to call out in
 the release notes as a possibly backwards incompatible change?

-- 
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/010701841b052923-eb668341-1c5b-45eb-b88f-b892185c9d07-00%40eu-central-1.amazonses.com.


Re: [Django] #34099: update_or_create() not saving data assigned in a model's save() method

2022-10-27 Thread Django
#34099: update_or_create() not saving data assigned in a model's save() method
-+-
 Reporter:  Phil Gyford  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (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):

 * cc: Simon Charette (added)


Comment:

 > But since update_fields was not so important in the past I can imagine
 users not implementing it leading to bugs that are not discovered for a
 while etc…

 I would argue that it was always important even before the
 `update_or_create` changes reliance was introduced.

 For example, when partially fetching model instance fields (e.g. using
 `only`) then
 
[https://github.com/django/django/blob/de2c2127b66e77a034c01c81753c5c08e651a5b4/django/db/models/base.py#L793-L802
 only the fetched fields will be updated] which
 
[https://docs.djangoproject.com/en/4.1/ref/models/querysets/#django.db.models.query.QuerySet.defer
 is documented].

 If we believe that documenting how to properly override `Model.save` or
 deal with `post_save` signal wrt/ to `update_fields` is not enough the
 only deprecation path I can think of that doesn't involve adding a setting
 is to add a temporary `__save_update_fields=False` kwarg to
 `update_or_create` and when `__save_update_fields is False` and `save() `
 is overridden or `post_save` signals are connected emit a deprecation
 warning and don't pass `update_fields`. That would allow callers to pass
 `__save_update_fields=True` to opt-in the new behaviour and silence the
 warning.

 This all seems like a lot of work for little benefit to me though given we
 didn't take this extra precautions when introducing `update_fields` in the
 first place in Django 1.5 and code that fails to account for this feature
 has been subtly broken since then.

-- 
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/010701841ab2817a-9b7c5759-67a3-4e07-9bad-f041fc1cd862-00%40eu-central-1.amazonses.com.


Re: [Django] #34123: Ambiguous aliases in ordering on combined queries with select_related().

2022-10-27 Thread Django
#34123: Ambiguous aliases in ordering on combined queries with select_related().
-+-
 Reporter:  Shai Berger  |Owner:  David
 |  Sanders
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  select_related   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by David Sanders):

 * owner:  nobody => David Sanders
 * status:  new => assigned


Comment:

 

-- 
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/010701841ab0c30a-5ed37e35-1671-4ca2-bcc0-607e15b3d82e-00%40eu-central-1.amazonses.com.


Re: [Django] #34123: Ambiguous aliases in ordering on combined queries with select_related().

2022-10-27 Thread Django
#34123: Ambiguous aliases in ordering on combined queries with select_related().
-+-
 Reporter:  Shai Berger  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  select_related   | 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):

 David, I'd appreciate if you could have a look.

 I'm pretty convinced the solution lies in using `with_col_aliases=True`
 and as long as the ordering clause is adjusted to refer to the column
 alias of the left-most query (the one combining the others) then it should
 work.

 From some initial testing it might require a bit of adjustments in
 `SQLCompiler.get_order_by` as well.

-- 
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/010701841aa00ef8-1f7972cb-c563-4fca-9eb8-ec98db13eeaf-00%40eu-central-1.amazonses.com.


Re: [Django] #10070: Named parameters not working on raw sql queries with sqlite

2022-10-27 Thread Django
#10070: Named parameters not working on raw sql queries with sqlite
-+-
 Reporter:  Matias Surdi |Owner:  Ryan
 |  Cheley
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Shai Berger):

 Replying to [comment:25 Ryan Cheley]:
 > Shai Berger can you confirm which version of SQLite you are using?

 {{{#!python
 Python 3.10.7 (main, Oct  1 2022, 04:31:04) [GCC 12.2.0] on linux
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import  sqlite3
 >>> sqlite3.sqlite_version
 '3.39.4'
 }}}
 (in the env where I checked)

-- 
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/010701841a82d275-10b195c7-8532-4528-92c7-c474c9cf8913-00%40eu-central-1.amazonses.com.


[Django] #34125: Limitting QuerySet crashes on union() with a single non-empty query

2022-10-27 Thread Django
#34125: Limitting QuerySet crashes on union() with a single non-empty query
-+-
   Reporter:  th3hamm0r  |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Database   |Version:  dev
  layer (models, ORM)|
   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  |
-+-
 We have an union-query, that works up until django 4.1.2, but stopped
 working with the latest dev-version of django.
 Basically, one QuerySet is non-empty, and the other one is empty,
 simplified:
 {{{
 q1 = PageLogEntry.objects.all().order_by()
 q2 = q1.union(PageLogEntry.objects.none())
 q2.order_by()[:1]
 }}}

 With PostgreSQL this leads to the following SQL (I've reduced the SQL to
 one field only -> "..."):
 {{{
 (SELECT "wagtailcore_pagelogentry"."id", ... FROM
 "wagtailcore_pagelogentry" LIMIT 1) LIMIT 1;
 }}}

 which results in this error:
 {{{
 psycopg2.errors.SyntaxError: multiple LIMIT clauses not allowed
 LINE 1: ..."."page_id" FROM "wagtailcore_pagelogentry" LIMIT 1) LIMIT 1
 }}}

 With django 4.1.2 the following valid SQL is generated:

 {{{
 (SELECT "wagtailcore_pagelogentry"."id", ... FROM
 "wagtailcore_pagelogentry") LIMIT 1;
 }}}

 With sqlite no errors are thrown in the dev-version.

 Note: In our actual queries, we use ordering (we remove ordering in the
 inner queries with `order_by()` and apply an ordering to the resulting
 union-queryset), but that does not change anything, since the limit seems
 to be the issue, so I've removed ordering to minimize the SQL.

 I've found a similar, fixed bug #32116, but in that case order_by had an
 issue.

-- 
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/010701841a7ae7a3-1bb510d7-74a3-40a9-b120-1902833c0de2-00%40eu-central-1.amazonses.com.


Re: [Django] #34099: update_or_create() not saving data assigned in a model's save() method

2022-10-27 Thread Django
#34099: update_or_create() not saving data assigned in a model's save() method
-+-
 Reporter:  Phil Gyford  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (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 Florian Apolloner):

 Thinking about this more I am wondering if we have to go through a
 deprecation path somehow for this feature/fix. The issue here is that
 overriding `save` and setting attributes is not reflected in the database
 which can be argued to be a dataloss bug. To be 100% clear on this: I
 actually do think that the new code is correct and it is up to the user to
 properly implement `save`. But since `update_fields` was not so important
 in the past I can imagine users not implementing it leading to bugs that
 are not discovered for a while etc… So I think this should be (it already
 is) a release blocker and should not downgraded to a normal bug. The only
 backwards compat fix I can envision is to hide this fix behind a setting
 which users need to turn to `True` + a backwards incompatible note in the
 release notes. This should pick up everyone reading the release notes or
 at least running their tests with warnings enabled. Another option would
 be to detect if `save` is overridden or if signals are attached to the
 model and act accordingly during the "deprecation".

-- 
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/010701841a6fcf73-53c26428-e05f-490c-9650-b3ffdae4bfd3-00%40eu-central-1.amazonses.com.


[Django] #34124: Developer experience on {% with %} template tag can be improved.

2022-10-27 Thread Django
#34124: Developer experience on {% with %} template tag can be improved.
-+-
   Reporter:  oscarmcm   |  Owner:  nobody
   Type: | Status:  new
  Cleanup/optimization   |
  Component:  Template   |Version:  4.1
  system |
   Severity:  Normal |   Keywords:  template tag
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 The "with" template tag just caches a complex variable under a simpler
 name, and from the Django Documentation we know that there's two ways to
 use this tag:

 - normal form
 {{{
 {% with alpha=1 beta=2 %}
 {% endwith %}
 }}}

 - verbose form
 {{{
 {% with business.employees.count as total %}
 {% endwith %}
 }}}

 But recently I was reviewing some code and found this:

 {{{
 {% with first_post_image as post_images.first.image %}
 ...
 {% endwith %}
 }}}

 As we can see the order of the parameters is wrong, I was a bit surprised
 that the Django template engine did not throw or raised an issue while
 trying to render the template, and in the same way I think the ticket
 #32157 is directly related to this. So I believe that we can improve the
 DX for this template tag and enforce the values that we want to cache,
 this means that we should allow only valid variable names and enforce
 value casting.

-- 
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/010701841a224919-db0eea78-f6ab-404d-8757-b67a2ce10594-00%40eu-central-1.amazonses.com.


Re: [Django] #33865: Optimize django.core.handlers.wsgi.LimitedStream

2022-10-27 Thread Django
#33865: Optimize django.core.handlers.wsgi.LimitedStream
-+-
 Reporter:  Nick Pope|Owner:  Nick Pope
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  HTTP handling|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  wsgi,| Triage Stage:  Accepted
  limitedstream, performance |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Anvesh Mishra):

 * cc: Anvesh Mishra (added)


-- 
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/010701841a08f353-2849488e-f076-4c46-9f57-247e6adea3c9-00%40eu-central-1.amazonses.com.


Re: [Django] #34123: Ambiguous aliases in ordering on combined queries with select_related().

2022-10-27 Thread Django
#34123: Ambiguous aliases in ordering on combined queries with select_related().
-+-
 Reporter:  Shai Berger  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  select_related   | 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):

 I was going to take a look when I get bored with $job but it sounds like
 you already have it figured out xD

 If you're too busy I can look though…

-- 
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/0107018419d3001b-6f9ce0ee-2c6c-448c-a870-d88e307d9597-00%40eu-central-1.amazonses.com.


Re: [Django] #34123: Ambiguous aliases in ordering on combined queries with select_related().

2022-10-27 Thread Django
#34123: Ambiguous aliases in ordering on combined queries with select_related().
-+-
 Reporter:  Shai Berger  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  select_related   | 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):

 Making sure the inner queries are generated with aliases for each columns,
 which is something we already have the machinery for, should be enough to
 address the issue.

 We just have to make sure the queries are compiled by passing
 `with_col_aliases=True` to their compiler's `as_sql`, something like

 {{{#!diff
 diff --git a/django/db/models/sql/compiler.py
 b/django/db/models/sql/compiler.py
 index 3097500be4..8b727f42ce 100644
 --- a/django/db/models/sql/compiler.py
 +++ b/django/db/models/sql/compiler.py
 @@ -563,7 +563,7 @@ def get_combinator_sql(self, combinator, all):
  *self.query.annotation_select,
  )
  )
 -part_sql, part_args = compiler.as_sql()
 +part_sql, part_args =
 compiler.as_sql(with_col_aliases=True)
  if compiler.query.combinator:
  # Wrap in a subquery if wrapping in parentheses isn't
  # supported
 }}}

-- 
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/0107018419c27749-e3e8c2b3-bf4d-49cf-bedc-a3eee0beb6dc-00%40eu-central-1.amazonses.com.


Re: [Django] #34123: Ambiguous aliases in ordering on combined queries with select_related().

2022-10-27 Thread Django
#34123: Ambiguous aliases in ordering on combined queries with select_related().
-+-
 Reporter:  Shai Berger  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  select_related   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by David Sanders):

 * cc: David Sanders (added)


Comment:

 Interesting read following the thread back.

 I'm guessing reverting to using column numbers is out of the question, is
 the solution here to simply alias the columns `c1`, `c2`, `c3` … etc. You
 only need to alias the first query in the union and the others follow
 suite.

-- 
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/0107018419bcbde8-e154398f-2634-45e7-a179-96dc99e3c90b-00%40eu-central-1.amazonses.com.


Re: [Django] #10070: Named parameters not working on raw sql queries with sqlite

2022-10-27 Thread Django
#10070: Named parameters not working on raw sql queries with sqlite
-+-
 Reporter:  Matias Surdi |Owner:  Ryan
 |  Cheley
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Ryan Cheley):

 Shai Berger can you confirm which version of SQLite you are using?

-- 
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/0107018419849944-ace11041-79aa-4c4f-9877-b891bb12ef63-00%40eu-central-1.amazonses.com.


Re: [Django] #33817: Use python-oracledb instead of cx-oracle

2022-10-27 Thread Django
#33817: Use python-oracledb instead of cx-oracle
-+-
 Reporter:  Alexander Shishenko  |Owner:  Jingbei
 |  Li
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Marti Raudsepp):

 * cc: Marti Raudsepp (added)


-- 
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/01070184193eb36e-4d00b705-76b8-4207-a8f3-8fcda958817e-00%40eu-central-1.amazonses.com.


Re: [Django] #12241: Admin forgets URL used for prefilling forms when hitting Save and add another

2022-10-27 Thread Django
#12241: Admin forgets URL used for prefilling forms when hitting Save and add
another
---+
 Reporter:  Odin Hørthe Omdal  |Owner:  matthewn
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Mariusz Felisiak):

 * needs_better_patch:  0 => 1


-- 
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/010701841939ba00-a0736aa8-c8b0-4934-8e85-5f45a0dab617-00%40eu-central-1.amazonses.com.


Re: [Django] #34122: models.ForeignObject is missing documentation

2022-10-27 Thread Django
#34122: models.ForeignObject is missing documentation
-+-
 Reporter:  Ömer Faruk Abacı |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Documentation|  Version:  4.1
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  custom join, | Triage Stage:
  multiple column join,  |  Unreviewed
  foreignobject  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Carlton Gibson):

 Of course we do :D

-- 
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/01070184190724a0-9f165387-9e88-4b67-98e1-8dacf87ea90b-00%40eu-central-1.amazonses.com.


Re: [Django] #34122: models.ForeignObject is missing documentation

2022-10-27 Thread Django
#34122: models.ForeignObject is missing documentation
-+-
 Reporter:  Ömer Faruk Abacı |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Documentation|  Version:  4.1
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  custom join, | Triage Stage:
  multiple column join,  |  Unreviewed
  foreignobject  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak):

 Replying to [comment:3 Carlton Gibson]:
 > Simon had a proposal in his DjangoCon US 2020 keynote about documenting
 some of the internals in a way that would help people learn the ORM, but
 not make them public and so commit to API stability. I don't know how that
 would role out, or if this would fall under it specifically, but it seems
 related.

 We have a ticket for this :), see #27617.

-- 
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/0107018419019537-a7d57b87-8465-41d9-bbb7-9f3276c73e4e-00%40eu-central-1.amazonses.com.


Re: [Django] #34122: models.ForeignObject is missing documentation

2022-10-27 Thread Django
#34122: models.ForeignObject is missing documentation
-+-
 Reporter:  Ömer Faruk Abacı |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Documentation|  Version:  4.1
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  custom join, | Triage Stage:
  multiple column join,  |  Unreviewed
  foreignobject  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * cc: Simon Charette (added)


Comment:

 Simon had a proposal in his DjangoCon US 2020 keynote about documenting
 some of the internals in a way that would help people learn the ORM, but
 not make them public and so commit to API stability. I don't know how that
 would role out, or if this would fall under it specifically, but it seems
 related.

-- 
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/0107018418fecbc9-192ce6ce-5e62-4c43-a462-2057aab9a973-00%40eu-central-1.amazonses.com.


Re: [Django] #33879: timesince - wrong results for 11 months + several weeks

2022-10-27 Thread Django
#33879: timesince - wrong results for 11 months + several weeks
-+-
 Reporter:  אורי |Owner:
 Type:   |  GianpaoloBranca
  Cleanup/optimization   |   Status:  assigned
Component:  Utilities|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * needs_better_patch:  0 => 1


Comment:

 The [https://github.com/django/django/pull/16027 suggested patch] adds a
 (I think) simple enough adjustment for varying month length. If that can
 be encapsulated in a helper function (perhaps with a few tests) I think
 should be ≈good to go.

-- 
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/0107018418f8a924-4ecfbf67-ebe2-4f39-ab64-bc5dd10d51aa-00%40eu-central-1.amazonses.com.


Re: [Django] #33701: Highlight error location in the technical 500 debug page on Python 3.11+.

2022-10-27 Thread Django
#33701: Highlight error location in the technical 500 debug page on Python 
3.11+.
-+
 Reporter:  Adam Johnson |Owner:  Giebisch
 Type:  New feature  |   Status:  assigned
Component:  Error reporting  |  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 Giebisch):

 * owner:  (none) => Giebisch
 * 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/0107018418e7fe18-f18dcce7-437f-4f0b-95e3-24b332a48b93-00%40eu-central-1.amazonses.com.


Re: [Django] #10070: Named parameters not working on raw sql queries with sqlite

2022-10-27 Thread Django
#10070: Named parameters not working on raw sql queries with sqlite
-+-
 Reporter:  Matias Surdi |Owner:  Ryan
 |  Cheley
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Shai Berger):

 * status:  closed => new
 * resolution:  fixed =>


Comment:

 Sorry -- this is still broken on Sqlite. The additions and fixes mentioned
 in comment:22 are mostly for Oracle and other backends. The Sqlite
 backend, at the time I write this, still has
 {{{#!python
 supports_paramstyle_pyformat = False
 }}}
 and still borks with a syntax error if you try to replicate the session in
 the ticket description.

-- 
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/0107018418e386a9-40e980bd-b2fe-4d77-93de-d38b918f1ea2-00%40eu-central-1.amazonses.com.


Re: [Django] #34110: Add InMemoryStorage

2022-10-27 Thread Django
#34110: Add InMemoryStorage
--+
 Reporter:  Josh  |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  File uploads/storage  |  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
--+

Comment (by Shai Berger):

 Consider also #23251 where the issue of storage in tests is addressed more
 comprehensively

-- 
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/0107018418cdd918-bde0e7bf-2acc-46b8-8e7c-3d7cce96f539-00%40eu-central-1.amazonses.com.


Re: [Django] #34123: Ambiguous aliases in ordering on combined queries with select_related(). (was: Regression: Ordering on combined queries with select_related)

2022-10-27 Thread Django
#34123: Ambiguous aliases in ordering on combined queries with select_related().
-+-
 Reporter:  Shai Berger  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  select_related   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the report!

 Regression in c58a8acd413ccc992dd30afd98ed900897e1f719.

-- 
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/0107018418c7096f-fbb02e1f-8c63-4cbe-8336-f47d29f9b1fd-00%40eu-central-1.amazonses.com.


Re: [Django] #16211: using negated F()-expression in update query

2022-10-27 Thread Django
#16211: using negated F()-expression in update query
-+-
 Reporter:  Walter Doekes|Owner:  David
 |  Wobrock
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  0 => 1


-- 
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/0107018418b9d2b2-bc6b8b16-d0f5-4762-a62f-6454288ff823-00%40eu-central-1.amazonses.com.


Re: [Django] #34123: Regression: Ordering on combined queries with select_related

2022-10-27 Thread Django
#34123: Regression: Ordering on combined queries with select_related
-+-
 Reporter:  Shai Berger  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  select_related   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Shai Berger):

 * Attachment "union-select-related-tests.diff" added.

 Tests to show and investigate the regression

-- 
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/0107018418ad07c9-3a183d8f-6609-4259-ad56-3d8838f395ff-00%40eu-central-1.amazonses.com.


[Django] #34123: Regression: Ordering on combined queries with select_related

2022-10-27 Thread Django
#34123: Regression: Ordering on combined queries with select_related
-+-
   Reporter:  Shai   |  Owner:  nobody
  Berger |
   Type:  Bug| Status:  new
  Component:  Database   |Version:  dev
  layer (models, ORM)|
   Severity:  Release|   Keywords:  select_related
  blocker|
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Ordering on combined queries with {{{select_related()}}} seems to have
 been slightly broken in [c58a8acd413ccc].

 Consider these tests:
 {{{#!python

 # Model Author has  `ordering = ["name"]` in its Meta

 def test_union_with_select_related_and_order(self):
 base_qs = Author.objects.select_related('extra').order_by()
 qs1 = base_qs.filter(name="a1")
 qs2 = base_qs.filter(name="a2")
 self.assertFalse(
 bool(
 qs1.union(qs2).order_by("pk")
 )
 )

 # first() also calls order_by("pk")

 def test_union_with_select_related_and_first(self):
 base_qs = Author.objects.select_related('extra')
 qs1 = base_qs.filter(name="a1")
 qs2 = base_qs.filter(name="a2")
 self.assertFalse(
 bool(
 qs1.union(qs2).first()
 )
 )

 }}}

 On Postrgres, both of these pass before the named commit, and error after
 it with
 {{{
 django.db.utils.ProgrammingError: ORDER BY "id" is ambiguous
 LINE 1: ...id") WHERE "queries_author"."name" = 'a2') ORDER BY "id" ASC
 }}}

 On Sqlite, the second test (where ordering from the model is in force)
 breaks even before this, with
 {{{
 django.db.utils.DatabaseError: ORDER BY not allowed in subqueries of
 compound statements.
 }}}
 but on current main, the first breaks too -- this time, with
 {{{
 django.db.utils.OperationalError: 1st ORDER BY term does not match any
 column in the result set
 }}}
 Note that on union queries without {{{select_related()}}}, ordering on
 {{{pk}}} works -- many existing tests use it, as well as another test I
 added (in the attached diff) just to be sure.

-- 
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/0107018418abf9b1-bdf6d825-115e-4b8f-9708-ff1523ba1f76-00%40eu-central-1.amazonses.com.


Re: [Django] #34099: update_or_create() not saving data assigned in a model's save() method

2022-10-27 Thread Django
#34099: update_or_create() not saving data assigned in a model's save() method
-+-
 Reporter:  Phil Gyford  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (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):

 OK, I misunderstood Simon. It seems that doc adjustments are the best way
 to move this forward.

-- 
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/010701841898e300-5bb2f3a2-ab7b-428c-801b-4da96ba4a958-00%40eu-central-1.amazonses.com.


Re: [Django] #34066: Accessing UserAdmin via to_field leads to link to PasswordResetForm being broken (404)

2022-10-27 Thread Django
#34066: Accessing UserAdmin via to_field leads to link to PasswordResetForm 
being
broken (404)
-+-
 Reporter:  Simon Kern   |Owner:  Simon
 |  Kern
 Type:  Bug  |   Status:  closed
Component:  contrib.auth |  Version:  dev
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  auth, password,  | Triage Stage:  Ready for
  reset, passwordreset   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"de2c2127b66e77a034c01c81753c5c08e651a5b4" de2c2127]:
 {{{
 #!CommitTicketReference repository=""
 revision="de2c2127b66e77a034c01c81753c5c08e651a5b4"
 Fixed #34066 -- Fixed link to password reset view in
 UserChangeForm.password's help text when using to_field.

 Co-Authored-By: David Sanders 
 Co-Authored-By: Mariusz Felisiak 
 }}}

-- 
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/0107018418959c29-db912e02-be15-4ca0-8b3c-fda79cde97f8-00%40eu-central-1.amazonses.com.


Re: [Django] #34119: ModelForm fields with callable defaults don't correctly propagate default values

2022-10-27 Thread Django
#34119: ModelForm fields with callable defaults don't correctly propagate 
default
values
-+-
 Reporter:  Benjamin Rigaud  |Owner:  David Sanders
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  4.1
 Severity:  Normal   |   Resolution:
 Keywords:  modelform| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * stage:  Ready for checkin => Accepted


Comment:

 You shouldn't mark your own PRs as ''"Ready for Checkin"''.

-- 
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/01070184186ac3f1-fc09459b-0e17-45a2-8320-be98ff745dbc-00%40eu-central-1.amazonses.com.


Re: [Django] #34119: ModelForm fields with callable defaults don't correctly propagate default values (was: Admin: ArrayField in inlines are not properly validated)

2022-10-27 Thread Django
#34119: ModelForm fields with callable defaults don't correctly propagate 
default
values
-+-
 Reporter:  Benjamin Rigaud  |Owner:  David
 |  Sanders
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  4.1
 Severity:  Normal   |   Resolution:
 Keywords:  modelform| Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by David Sanders):

 * keywords:  admin, arrayfield, forms => modelform
 * needs_better_patch:  1 => 0
 * stage:  Accepted => Ready for checkin


-- 
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/01070184182f6525-57fd357a-5de4-48e1-ba63-f0e61cb1dc2c-00%40eu-central-1.amazonses.com.


Re: [Django] #34122: models.ForeignObject is missing documentation

2022-10-27 Thread Django
#34122: models.ForeignObject is missing documentation
-+-
 Reporter:  Ömer Faruk Abacı |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Documentation|  Version:  4.1
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  custom join, | Triage Stage:
  multiple column join,  |  Unreviewed
  foreignobject  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Ömer Faruk Abacı):

 I see your point, thank you!

-- 
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/01070184182dc180-72025901-6300-482b-9652-fa5683c22087-00%40eu-central-1.amazonses.com.


Re: [Django] #19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear

2022-10-27 Thread Django
#19215: ImageField's “Currently” and “Clear” Sometimes Don't Appear
-+-
 Reporter:  nrogers64@…  |Owner:  Marcelo
 |  Galigniana
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  1.4
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  ImageField   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-

Comment (by GitHub ):

 In [changeset:"d559cb02da30f74debbb1fc3a46de0df134d2d80" d559cb0]:
 {{{
 #!CommitTicketReference repository=""
 revision="d559cb02da30f74debbb1fc3a46de0df134d2d80"
 Refs #19215 -- Fixed admin_widgets tests if Pillow isn't installed.

 Follow up to c0fc1b5302f5d9d82e2255fb5758321fbac34949.
 }}}

-- 
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/01070184182c8d51-790f0bb6-1e95-445c-8361-ce63381bfc73-00%40eu-central-1.amazonses.com.