Re: [Django] #32830: The 'last' filter in django template default tags give negative index error

2021-06-08 Thread Django
#32830: The 'last' filter in django template default tags give negative index 
error
-+-
 Reporter:  sushantg2001 |Owner:
 |  sushantg2001
 Type:  Bug  |   Status:  closed
Component:  Template system  |  Version:  3.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  last django- | Triage Stage:
  template   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

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


Comment:

 The `last` template filter is not intended to work with a queryset but
 with a list, see
 [https://docs.djangoproject.com/en/3.2/ref/templates/builtins/#last docs].
 You can use `{{ queryset.last }}`, which will call
 [https://docs.djangoproject.com/en/3.2/ref/models/querysets/#last
 QuerySet.last()].

-- 
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/070.7056e0be4702d213cde0735c268707c0%40djangoproject.com.


Re: [Django] #32829: clearsessions help text is incorrect

2021-06-08 Thread Django
#32829: clearsessions help text is incorrect
--+
 Reporter:  Baptiste Mispelon |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.sessions  |  Version:  3.2
 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 Mariusz Felisiak):

 * stage:  Unreviewed => Accepted


Comment:

 Good catch, it's obsolete since 5fec97b9df6ea075483276de159e522a29437773.

-- 
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/067.c53e357c89231d21f400f7c6c5ed849c%40djangoproject.com.


Re: [Django] #32830: The 'last' filter in django template default tags give negative index error

2021-06-08 Thread Django
#32830: The 'last' filter in django template default tags give negative index 
error
-+-
 Reporter:  sushantg2001 |Owner:
 |  sushantg2001
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  3.2
 Severity:  Normal   |   Resolution:
 Keywords:  last django- | Triage Stage:
  template   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by sushantg2001):

 * owner:  nobody => sushantg2001
 * 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/070.c6da224c294c53c04c4cf99d2f0f5e28%40djangoproject.com.


[Django] #32830: The 'last' filter in django template default tags give negative index error

2021-06-08 Thread Django
#32830: The 'last' filter in django template default tags give negative index 
error
-+-
   Reporter: |  Owner:  nobody
  sushantg2001   |
   Type:  Bug| Status:  new
  Component:  Template   |Version:  3.2
  system |   Keywords:  last django-
   Severity:  Normal |  template
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  0  |
-+-
 The 'last' filter in django template default tags give negative index
 error. This is because the code uses negative indexing to get the value
 which are not supported by RelatedManager querysets

-- 
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/055.401d410b46919916478f027b113dd1de%40djangoproject.com.


[Django] #32829: clearsessions help text is incorrect

2021-06-08 Thread Django
#32829: clearsessions help text is incorrect
+
   Reporter:  Baptiste Mispelon |  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  contrib.sessions  |Version:  3.2
   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 |
+
 The `--help` text for the `clearsessions` command states:

 > Can be run as a cronjob or directly to clean out expired sessions  (only
 with the database backend at the moment).


 But looking at the backends, several of them (not just the `database` one)
 implement the `clear_expired()` method used by that command.

 I would suggest the following replacement:

 > Can be run as a cronjob or directly to clean out expired sessions when
 the backend supports 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/052.a59d9505c37be6eddb57e472de19fdb4%40djangoproject.com.


Re: [Django] #28889: Use JavaScript to prevent double submission of admin forms

2021-06-08 Thread Django
#28889: Use JavaScript to prevent double submission of admin forms
--+
 Reporter:  Manuel Saelices   |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.admin |  Version:  1.11
 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 Mariusz Felisiak):

 * owner:  Karan Bedi => (none)
 * status:  assigned => new


-- 
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/067.2ac541944c8ea349efd0ffab3bddf7af%40djangoproject.com.


Re: [Django] #18597: `BaseInlineFormSet` should attempt to get it's queryset from it's instance related manager before falling back to it's model's default manager

2021-06-08 Thread Django
#18597: `BaseInlineFormSet` should attempt to get it's queryset from it's 
instance
related manager before falling back to it's model's default manager
--+
 Reporter:  Simon Charette|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Forms |  Version:  3.2
 Severity:  Normal|   Resolution:
 Keywords:  model formset inline  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  1 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Tony Narlock):

 For context, this is a blocker for a downstream plugin, see
 https://github.com/theatlantic/django-nested-admin/issues/76

-- 
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/067.f9d9170385e02f7333bb63ce70dd9efc%40djangoproject.com.


Re: [Django] #14357: Prevent inappropriate order-based grouping on values+annotate queries

2021-06-08 Thread Django
#14357: Prevent inappropriate order-based grouping on values+annotate queries
-+-
 Reporter:  Martin Chase |Owner:  (none)
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  3.1  | 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 Mariusz Felisiak ):

 In [changeset:"9b096063c13085d06236a72dcc46915f4c4ec28a" 9b096063]:
 {{{
 #!CommitTicketReference repository=""
 revision="9b096063c13085d06236a72dcc46915f4c4ec28a"
 [3.2.x] Refs #14357 -- Updated docs about interaction between aggregations
 and QuerySet.order_by().

 Obsolete since 0ddb4ebf7bfcc4730c80a772dd146a49ef6895f6.
 Backport of fcd44b889f36c4be87910745614a0a4c88d7a3d8 from main
 }}}

-- 
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/070.cd565d7fa72d08dfa220f3bc4278e2a1%40djangoproject.com.


Re: [Django] #14357: Prevent inappropriate order-based grouping on values+annotate queries

2021-06-08 Thread Django
#14357: Prevent inappropriate order-based grouping on values+annotate queries
-+-
 Reporter:  Martin Chase |Owner:  (none)
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  3.1  | 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:"fcd44b889f36c4be87910745614a0a4c88d7a3d8" fcd44b88]:
 {{{
 #!CommitTicketReference repository=""
 revision="fcd44b889f36c4be87910745614a0a4c88d7a3d8"
 Refs #14357 -- Updated docs about interaction between aggregations and
 QuerySet.order_by().

 Obsolete since 0ddb4ebf7bfcc4730c80a772dd146a49ef6895f6.
 }}}

-- 
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/070.cab20d9440336147fbf8ada3b3ab04a2%40djangoproject.com.


Re: [Django] #32824: Potential micro-optimisations for NodeList.render

2021-06-08 Thread Django
#32824: Potential micro-optimisations for NodeList.render
-+-
 Reporter:  Keryn Knight |Owner:  Keryn
 Type:   |  Knight
  Cleanup/optimization   |   Status:  assigned
Component:  Template system  |  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
-+-

Comment (by Keryn Knight):

 Sigh. Apologies for the noise, but I went for a coffee and realised I was
 mis-representing the performance of the **original** method (last set of
 benchmarks above) by not ensuring my `FakeNode` was a subclass of `Node`
 (and thus `render_annotated` wasn't being called, and so the string being
 returned was the class repr, inflating things massively) ... and that's
 not useful to anyone, so here's a repeat which should more accurately
 demonstrate the change for historic record:

 {{{
 Line #Mem usageIncrement  Occurences   Line Contents
 
956 60.2 MiB 52.9 MiB  10   def render(self,
 context):
957 60.2 MiB  0.0 MiB  10   bits = []
958 60.4 MiB -11945.9 MiB 110   for node in self:
959 60.4 MiB -11946.1 MiB 100   if
 isinstance(node, Node):
960 60.4 MiB -11946.1 MiB 100   bit =
 node.render_annotated(context)
961 else:
962 bit = node
963 60.4 MiB -11939.6 MiB 100
 bits.append(str(bit))
964 60.5 MiB  1.0 MiB  10   return
 mark_safe(''.join(bits))
 }}}
 and the timeit:
 {{{
 306 ms ± 2.66 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
 }}}
 (consistently between 305 and 315ms across repeated runs)

-- 
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/067.98c20fde7558126a9915be0f940eb00a%40djangoproject.com.


Re: [Django] #32824: Potential micro-optimisations for NodeList.render

2021-06-08 Thread Django
#32824: Potential micro-optimisations for NodeList.render
-+-
 Reporter:  Keryn Knight |Owner:  Keryn
 Type:   |  Knight
  Cleanup/optimization   |   Status:  assigned
Component:  Template system  |  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 Keryn Knight):

 * 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/067.6ad6febe27bda67a74bbf7d1948cbe9b%40djangoproject.com.


Re: [Django] #32824: Potential micro-optimisations for NodeList.render

2021-06-08 Thread Django
#32824: Potential micro-optimisations for NodeList.render
-+-
 Reporter:  Keryn Knight |Owner:  Keryn
 Type:   |  Knight
  Cleanup/optimization   |   Status:  assigned
Component:  Template system  |  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 Keryn Knight):

 Oh and for completeness, the **original** method before any of these
 proposed changes, for historic reference:

 {{{
 %mprun -f NodeList.render render()
 Line #Mem usageIncrement  Occurences   Line Contents
 
957 62.3 MiB-43.6 MiB  10   def render(self,
 context):
958 62.3 MiB  0.0 MiB  10   bits = []
959 72.8 MiB -4336382.0 MiB 110   for node in self:
960 72.8 MiB -4336466.3 MiB 100   if
 isinstance(node, Node):
961 bit =
 node.render_annotated(context)
962 else:
963 72.8 MiB -416.3 MiB 100   bit =
 node
964 72.8 MiB -4333210.0 MiB 100
 bits.append(str(bit))
965 72.8 MiB 10.1 MiB  10   return
 mark_safe(''.join(bits))
 }}}
 and the timeit (remember this is the pathological case in terms of nodes
 to iterate over):
 {{{
 578 ms ± 4.64 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
 }}}
 consistently between 850-615ms across repeated runs.

-- 
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/067.1e4635dea683ba5fd5d099d21fdc6d16%40djangoproject.com.


Re: [Django] #32824: Potential micro-optimisations for NodeList.render

2021-06-08 Thread Django
#32824: Potential micro-optimisations for NodeList.render
-+-
 Reporter:  Keryn Knight |Owner:  Keryn
 Type:   |  Knight
  Cleanup/optimization   |   Status:  assigned
Component:  Template system  |  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 Keryn Knight):

 * Attachment "nodelist_render_test.py" added.

 synthetic test for isolating just this method, with memory profiler etc

-- 
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/067.3f250e05c5cf5c60a130572278dd72e7%40djangoproject.com.


Re: [Django] #32824: Potential micro-optimisations for NodeList.render

2021-06-08 Thread Django
#32824: Potential micro-optimisations for NodeList.render
-+-
 Reporter:  Keryn Knight |Owner:  Keryn
 Type:   |  Knight
  Cleanup/optimization   |   Status:  assigned
Component:  Template system  |  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 Keryn Knight):

 * owner:  nobody => Keryn Knight
 * status:  new => assigned


Comment:

 I think I'm happier still with that change, I wasn't proposing it because
 I couldn't previously get `memory_profiler` to play ball, but (at least in
 the pathological case of a stupid number of child nodes) it does skip the
 intermediate list, which does have some small measure on runtime
 performance:

 Using a small stub for benchmarking, using ipython:
 {{{
 from nodelist_render_test import render
 from django.template.base import NodeList
 %load_ext memory_profiler
 %mprun -f NodeList.render render()
 Line #Mem usageIncrement  Occurences   Line Contents
 
957 58.8 MiB 51.1 MiB  10   def render(self,
 context):
958 # return
 SafeString(''.join([
959 #
 str(node.render_annotated(context))
960 # for node in
 self
961 # ]))
962 58.8 MiB  0.0 MiB  10   bits = []
963 58.8 MiB  0.0 MiB  10   append =
 bits.append
964 59.5 MiB  0.0 MiB 110   for node in self:
965 59.5 MiB  7.4 MiB 100
 append(str(node.render_annotated(context)))
966 59.6 MiB  1.1 MiB  10   return
 SafeString(''.join(bits))
 }}}
 and:
 {{{
 %timeit render()
 216 ms ± 3.83 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
 }}}
 timeit is consistently between 215ms & 225ms, repeatedly running the above
 (rather than using `-nX00`)

 switching to the generator expression version, now I've got
 `memory_profiler` to report ''something'':
 {{{
 %mprun -f NodeList.render render()
 Line #Mem usageIncrement  Occurences   Line Contents
 
957 58.7 MiB 51.3 MiB  10   def render(self,
 context):
958 58.9 MiB -11945.8 MiB 140   return
 SafeString(''.join([
959 58.8 MiB -11939.6 MiB 100
 str(node.render_annotated(context))
960 58.8 MiB -25012.3 MiB 110   for node in
 self
961 ]))
962 # bits = []
963 # append =
 bits.append
964 # for node in self:
965 #
 append(str(node.render_annotated(context)))
966 # return
 SafeString(''.join(bits))
 }}}
 dunno what to make of the deallocations, but I guess zeroes or minus
 numbers are better than `7.1MB` ... maybe I really am generating 11GB of
 nodes in this synthetic benchmark :)

 and timeit:
 {{{
 %timeit render()
 202 ms ± 1.92 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
 }}}
 timeit was consistently around 200 to 205ms repeatedly running 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/067.7e1b252283d1a8b82b9e63d0de3de3d6%40djangoproject.com.


Re: [Django] #32828: Wrong .count() for GROUP BY on ordered queryset

2021-06-08 Thread Django
#32828: Wrong .count() for GROUP BY on ordered queryset
-+-
 Reporter:  Maxim Petrov |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  3.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 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
 * resolution:   => invalid


Comment:

 Thanks for this report, however these queries can return different results
 (see also #30655).

 `count()` calls `SELECT COUNT(*)` (as described in
 [https://docs.djangoproject.com/en/stable/ref/models/querysets/#count
 docs]) without taking ordering into account, so in your case it returns
 the number of `Foo`'s names (this behavior is in Django since
 7bc57a6d71dd4d00bb09cfa67be547591fd759ce).

 It can be surprising that columns from `order_by()` calls are included in
 the `GROUP BY` clauses, that's we it's
 [https://docs.djangoproject.com/en/3.2/topics/db/aggregation/#interaction-
 with-default-ordering-or-order-by documented].

 To get the same results you can clear ordering or add `data` to the
 `values()`:

 {{{
 
Foo.objects.order_by("date").values("name").annotate(models.Count("name")).order_by()
 Foo.objects.order_by("date").values("name",
 "date").annotate(models.Count("name"))
 }}}

-- 
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/069.07dae2820b922dde36f1d2e6941a8c23%40djangoproject.com.


Re: [Django] #32827: Squashing migrations isn't very effective in complicated projects; rewrite docs to provide a preferred manual trimming process

2021-06-08 Thread Django
#32827: Squashing migrations isn't very effective in complicated projects; 
rewrite
docs to provide a preferred manual trimming process
-+-
 Reporter:  Mike Lissner |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations,  | Triage Stage:  Accepted
  squashmigration, documentation |
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:

 Not sure that `squashmigrations` is not the preferred option for most/many
 projects. It works perfectly well for a lot of cases. 樂
 Probably _Automatically squash_ vs _Manually squash_ vs _trim_ (for me)
 Comments on [https://github.com/django/django/pull/14408 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/066.ca6fb10ba919aada66a15cd67913f312%40djangoproject.com.


Re: [Django] #32813: Display development server address after server bind

2021-06-08 Thread Django
#32813: Display development server address after server bind
-+-
 Reporter:  fmwviormv|Owner:  fmwviormv
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  dev
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  development server,  | Triage Stage:  Accepted
  automatic port |
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


-- 
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/067.373d158098d9c92a837b672276453a50%40djangoproject.com.


Re: [Django] #32355: Drop support for Python 3.6 & 3.7.

2021-06-08 Thread Django
#32355: Drop support for Python 3.6 & 3.7.
-+-
 Reporter:  Mariusz Felisiak |Owner:  Mariusz
 Type:   |  Felisiak
  Cleanup/optimization   |   Status:  closed
Component:  Core (Other) |  Version:  4.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by GitHub ):

 In [changeset:"faba5b702a9c5bb9452a543100928bcb5f66ebcf" faba5b7]:
 {{{
 #!CommitTicketReference repository=""
 revision="faba5b702a9c5bb9452a543100928bcb5f66ebcf"
 Refs #32355 -- Used addClassCleanup() in SimpleTestCase and
 SerializeMixin.
 }}}

-- 
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/065.39c0f857f0be3d3d5adecd0c30b2f529%40djangoproject.com.


Re: [Django] #24462: Add a new QuerySet operation to use current results as a subquery

2021-06-08 Thread Django
#24462: Add a new QuerySet operation to use current results as a subquery
-+-
 Reporter:  trosos   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  distinct order_by| Triage Stage:  Accepted
  subquery   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Jameel A.):

 * cc: Jameel A. (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/064.e60233724c9868faae98f74b2aef02e1%40djangoproject.com.


Re: [Django] #28919: Add support for Common Table Expression (CTE) queries

2021-06-08 Thread Django
#28919: Add support for Common Table Expression (CTE) queries
-+-
 Reporter:  Daniel Miller|Owner:  Moses
 |  Mugisha
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  QuerySet.extra   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Jameel A.):

 * cc: Jameel A. (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/067.3f9c2454fc258dbe14fc0e9e5318bddb%40djangoproject.com.


[Django] #32828: Wrong .count() for GROUP BY on ordered queryset

2021-06-08 Thread Django
#32828: Wrong .count() for GROUP BY on ordered queryset
-+-
   Reporter:  Maxim  |  Owner:  nobody
  Petrov |
   Type:  Bug| Status:  new
  Component:  Database   |Version:  3.2
  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  |
-+-
 {{{#!python
 class Foo(models.Model):
 name = models.TextField()
 date = models.DateTimeField()

 queryset =
 Foo.objects.order_by("date").values("name").annotate(models.Count("name"))
 }}}

 For this queryset Django use date in GROUP BY:
 {{{#!sql
 SELECT "foo"."name", COUNT("foo"."name") AS "name__count" FROM "foo" GROUP
 BY "foo"."name", "foo"."date" ORDER BY "foo"."date" ASC
 }}}
 But `queryset.count()` doesn't use it:
 {{{#!sql
 SELECT COUNT(*) FROM (SELECT "foo"."name" AS Col1, COUNT("foo"."name") AS
 "name__count" FROM "foo" GROUP BY "foo"."name")
 }}}
 So `queryset.count()` isn't equal real queryset length.

-- 
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/054.5288ee8ccb83d89167273103c3ef1419%40djangoproject.com.


Re: [Django] #32797: model_ngettext incorrectly tries to translate already translated words

2021-06-08 Thread Django
#32797: model_ngettext incorrectly tries to translate already translated words
-+-
 Reporter:  Maciej Olko  |Owner:  (none)
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  3.2
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  i18n, gettext,   | Triage Stage:
  ngettext   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by Carlton Gibson):

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


Comment:

 Hi Maciej.

 No doubt my lack of knowledge of the internals of the i18n, but I'm
 struggling to pin this.

 Using French as the active language for an example:

 1. Create multiple users (who have a lazy
 `verbose_name`/`verbose_name_plural` defined).
 2. Use the delete selected action from the changelist (triggering the
 `model_ngettext()` flow)
 3. Observe correct translation.

 [[Image(https://code.djangoproject.com/raw-
 attachment/ticket/32797/Screenshot%202021-06-08%20at%2010.23.33.png)]]

 It's at that level (which is the public API) that it would be good if you
 can present a failing test.

 > Effectively it makes Django not use correct plural translations for
 verbose name for any language that has other plural rules then English for
 phrases

 So I'm guessing French is not the right example language?

 Is this a duplicate of #11688?

 From the PR, adding the `ngettext_noop('log entry', 'log entries')`
 function call into `Meta` declarations doesn't look like the right
 approach. If `model_ngettext` does need extra logic to detect these cases,
 we should keep that logic internal to the function. (I'll close the
 current PR on that basis.)

 I'm going to mark as needs info, but happy to discuss further if you can
 help pin it down, perhaps with that test case?

 Thanks!

-- 
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/065.d1e0c456132ed9d6eae11e2ec3518dd3%40djangoproject.com.


Re: [Django] #32797: model_ngettext incorrectly tries to translate already translated words

2021-06-08 Thread Django
#32797: model_ngettext incorrectly tries to translate already translated words
-+-
 Reporter:  Maciej Olko  |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  3.2
 Severity:  Normal   |   Resolution:
 Keywords:  i18n, gettext,   | Triage Stage:
  ngettext   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by Carlton Gibson):

 * Attachment "Screenshot 2021-06-08 at 10.23.33.png" added.

 verbose_name_plural being translated in message.

-- 
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/065.cc2a3fe93e4686be2ad891bca662abe5%40djangoproject.com.


Re: [Django] #28785: Tracking migrations

2021-06-08 Thread Django
#28785: Tracking migrations
---+-
 Reporter:  Ramez Kabbani  |Owner:  Manav Agarwal
 Type:  New feature|   Status:  assigned
Component:  Migrations |  Version:  1.11
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  1  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  0 => 1
 * needs_tests:  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/070.70a0def5c64b6838cdfe354f19192c9c%40djangoproject.com.


Re: [Django] #25255: Squashed migration is not marked as unapplied

2021-06-08 Thread Django
#25255: Squashed migration is not marked as unapplied
-+-
 Reporter:  Markus Holtermann|Owner:  Jacob
 |  Walls
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.8
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | 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 Mariusz Felisiak ):

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


Comment:

 In [changeset:"c0e29cec83d000cc0b1087214e4658074fa0499c" c0e29ce]:
 {{{
 #!CommitTicketReference repository=""
 revision="c0e29cec83d000cc0b1087214e4658074fa0499c"
 Fixed #25255 -- Recorded unapplied squashed migrations.
 }}}

-- 
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/065.e8deb6cb493e3b0eea49e48e93533c24%40djangoproject.com.


Re: [Django] #25255: Squashed migration is not marked as unapplied

2021-06-08 Thread Django
#25255: Squashed migration is not marked as unapplied
-+-
 Reporter:  Markus Holtermann|Owner:  Jacob
 |  Walls
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  1.8
 Severity:  Normal   |   Resolution:
 Keywords:   | 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 Mariusz Felisiak):

 * 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/065.0190cb918057dca0b44c81b7d43cf930%40djangoproject.com.


Re: [Django] #31653: Add PostgreSQL operations to add constraints via NOT VALID / VALIDATE CONSTRAINT

2021-06-08 Thread Django
#31653: Add PostgreSQL operations to add constraints via NOT VALID / VALIDATE
CONSTRAINT
-+-
 Reporter:  Adam Johnson |Owner:  Sanskar
 |  Jaiswal
 Type:  New feature  |   Status:  closed
Component:  contrib.postgres |  Version:  dev
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | 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 Mariusz Felisiak ):

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


Comment:

 In [changeset:"8c3bd0b708b488a1f6e8bd8cc6b96569904605be" 8c3bd0b7]:
 {{{
 #!CommitTicketReference repository=""
 revision="8c3bd0b708b488a1f6e8bd8cc6b96569904605be"
 Fixed #31653 -- Added AddConstraintNotValid()/ValidateConstraint()
 operations for PostgreSQL.
 }}}

-- 
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/068.0b1420be11d223b3e690f4c30f13a877%40djangoproject.com.


Re: [Django] #32813: Display development server address after server bind

2021-06-08 Thread Django
#32813: Display development server address after server bind
-+-
 Reporter:  fmwviormv|Owner:  fmwviormv
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  dev
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  development server,  | Triage Stage:  Accepted
  automatic port |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * type:  New feature => Bug
 * 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/067.5d271e3a595fcfe68e546d0c603bc0b1%40djangoproject.com.