Re: [Django] #35402: DatabaseFeatures.django_test_skips crashes when it references a class in another test module

2024-04-25 Thread Django
#35402: DatabaseFeatures.django_test_skips crashes when it references a class in
another test module
-+-
 Reporter:  Tim Graham   |Owner:  jon-mcfee
 Type:  Bug  |   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 jon-mcfee):

 Okay, I made a PR. I'm not sure if it's naive to assume that tests must
 start with "test", but I passed all local tests and automated testing, so
 please let me know if that should work.
-- 
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/0107018f1737f4c5-d661574a-3573-48d0-a3c3-cddf1aa2acd3-00%40eu-central-1.amazonses.com.


Re: [Django] #35339: Ordering and filtering a Postgres ArrayAgg with parameters inverts SQL param order

2024-04-25 Thread Django
#35339: Ordering and filtering a Postgres ArrayAgg with parameters inverts SQL
param order
-+-
 Reporter:  Chris M  |Owner:  Chris M
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  postgres arrayagg| Triage Stage:  Ready for
  ordering   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by nessita <124304+nessita@…>):

 In [changeset:"42b567ab4c5bfb1bbd3e629b1079271c5ae44ea0" 42b567ab]:
 {{{#!CommitTicketReference repository=""
 revision="42b567ab4c5bfb1bbd3e629b1079271c5ae44ea0"
 Refs #35339 -- Updated Aggregate class to return consistent source
 expressions.

 Refactored the filter and order_by expressions in the Aggregate class to
 return a list of Expression (or None) values, ensuring that the list
 item is always available and represents the filter expression.
 For the PostgreSQL OrderableAggMixin, the returned list will always
 include the filter and the order_by value as the last two elements.

 Lastly, emtpy Q objects passed directly into aggregate objects using
 Aggregate.filter in admin facets are filtered out when resolving the
 expression to avoid errors in get_refs().

 Thanks Simon Charette for the review.
 }}}
-- 
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/0107018f16fcac9f-5ebc2307-02c2-47a0-a405-e1078b14666b-00%40eu-central-1.amazonses.com.


Re: [Django] #35339: Ordering and filtering a Postgres ArrayAgg with parameters inverts SQL param order

2024-04-25 Thread Django
#35339: Ordering and filtering a Postgres ArrayAgg with parameters inverts SQL
param order
-+-
 Reporter:  Chris M  |Owner:  Chris M
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  postgres arrayagg| Triage Stage:  Ready for
  ordering   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by nessita <124304+nessita@…>):

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

Comment:

 In [changeset:"c8df2f994130d74ec35d32a36e30aad7d6ea8e3a" c8df2f99]:
 {{{#!CommitTicketReference repository=""
 revision="c8df2f994130d74ec35d32a36e30aad7d6ea8e3a"
 Fixed #35339 -- Fixed PostgreSQL aggregate's filter and order_by params
 order.

 Updated OrderableAggMixin.as_sql() to separate the order_by parameters
 from the filter parameters. Previously, the parameters and SQL were
 calculated by the Aggregate parent class, resulting in a mixture of
 order_by and filter parameters.

 Thanks Simon Charette for the review.
 }}}
-- 
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/0107018f16fcacca-fd8ce3ce-b3cc-4883-ab7c-f856a30243cf-00%40eu-central-1.amazonses.com.


Re: [Django] #35339: Ordering and filtering a Postgres ArrayAgg with parameters inverts SQL param order

2024-04-25 Thread Django
#35339: Ordering and filtering a Postgres ArrayAgg with parameters inverts SQL
param order
-+-
 Reporter:  Chris M  |Owner:  Chris M
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  postgres arrayagg| Triage Stage:  Ready for
  ordering   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Natalia Bidart):

 * 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/0107018f16fc1d1c-c5587c33-01dc-4ea0-8254-12fe3215a9e7-00%40eu-central-1.amazonses.com.


Re: [Django] #35402: DatabaseFeatures.django_test_skips crashes when it references a class in another test module

2024-04-25 Thread Django
#35402: DatabaseFeatures.django_test_skips crashes when it references a class in
another test module
-+-
 Reporter:  Tim Graham   |Owner:  jon-mcfee
 Type:  Bug  |   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 jon-mcfee):

 * owner:  (none) => jon-mcfee
 * 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/0107018f1678bc3f-8d36c29c-5ffd-4748-9a65-6d16a5680667-00%40eu-central-1.amazonses.com.


Re: [Django] #35405: Use @cached_property for FieldCacheMixin cache key

2024-04-25 Thread Django
#35405: Use @cached_property for FieldCacheMixin cache key
-+-
 Reporter:  Adam Johnson |Owner:  Adam
 Type:   |  Johnson
  Cleanup/optimization   |   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 Simon Charette):

 * needs_better_patch:  0 => 1
 * stage:  Unreviewed => Accepted

Comment:

 It's a change that isn't too invasive so I think it's worth doing. I think
 we should add a deprecation shim for `get_cache_name` 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/0107018f1645a5e9-d588f249-5544-4afb-9aec-bcf32d197551-00%40eu-central-1.amazonses.com.


[Django] #35405: Use @cached_property for FieldCacheMixin cache key

2024-04-25 Thread Django
#35405: Use @cached_property for FieldCacheMixin cache key
-+-
   Reporter:  Adam   |  Owner:  Adam Johnson
  Johnson|
   Type: | Status:  assigned
  Cleanup/optimization   |
  Component:  Database   |Version:  dev
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  1
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 `FieldCacheMixin` is used by related fields to track their cached values.
 Its existing design means calling `get_cache_name()` for each operation,
 even though that value doesn’t change. Changing `get_cache_name()` into a
 cached property can thus save a bunch of small but useless function calls
 working with related fields.

 I profiled this change by using cProfile on a selection of tests using
 related fields:

 {{{
 $ python -m cProfile -s cumtime -o profile runtests.py --parallel 1
 foreign_object *relat*
 ...
 Found 399 test(s).
 ...
 }}}

 Before, there were 12,520 function calls:

 {{{
 $ python -m pstats profile <<< 'sort cumtime
 stats 1' | rg get_cache_name
 111930.0010.0000.0010.000
 
/Users/chainz/Documents/Projects/django/django/db/models/fields/related.py:512(get_cache_name)
   7120.0000.0000.0000.000
 
/Users/chainz/Documents/Projects/django/django/db/models/fields/reverse_related.py:251(get_cache_name)
   6150.0000.0000.0000.000
 
/Users/chainz/Documents/Projects/django/django/contrib/contenttypes/fields.py:143(get_cache_name)
 }}}

 After, there are just 227 calls (should be one per related field):

 {{{
 $ python -m pstats profile <<< 'sort cumtime
 stats 1' | rg cache_name
   1720.0000.0000.0000.000
 
/Users/chainz/Documents/Projects/django/django/db/models/fields/related.py:512(cache_name)
340.0000.0000.0000.000
 
/Users/chainz/Documents/Projects/django/django/db/models/fields/reverse_related.py:251(cache_name)
210.0000.0000.0000.000
 
/Users/chainz/Documents/Projects/django/django/contrib/contenttypes/fields.py:143(cache_name)
 }}}

 The time saving is minimal here. It may be notable when working with a lot
 of model instances.
-- 
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/0107018f1638d8ff-e72e85c3-4164-41ce-92db-712ac77c250b-00%40eu-central-1.amazonses.com.


Re: [Django] #35328: Improve CSRF Origin checking messaging

2024-04-25 Thread Django
#35328: Improve CSRF Origin checking messaging
-+-
 Reporter:  Ryan Hiebert |Owner:  Ryan
 Type:   |  Hiebert
  Cleanup/optimization   |   Status:  assigned
Component:  CSRF |  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 Sarah Boyce):

 * 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/0107018f15ae3e47-92d283d6-2b7a-48c1-8124-84715fa8618b-00%40eu-central-1.amazonses.com.


Re: [Django] #17235: Multipartparser shouldn't leave request.POST/request.FILES mutable

2024-04-25 Thread Django
#17235: Multipartparser shouldn't leave request.POST/request.FILES mutable
---+
 Reporter:  Florian Apolloner  |Owner:  bcail
 Type:  Bug|   Status:  assigned
Component:  HTTP handling  |  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 Sarah Boyce):

 * needs_better_patch:  0 => 1

Comment:

 > Is that a good direction to go?

 I think it looks good to me as a direction, added some comments to the 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/0107018f1448e66d-399b055c-44bf-47a4-b7f0-6c35297e02c6-00%40eu-central-1.amazonses.com.


Re: [Django] #35404: Admin fieldset multiple flexbox regressions

2024-04-25 Thread Django
#35404: Admin fieldset multiple flexbox regressions
+
 Reporter:  minusf  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  contrib.admin   |  Version:  4.2
 Severity:  Normal  |   Resolution:
 Keywords:  css admin fieldset  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  1
+
Changes (by Sarah Boyce):

 * stage:  Unreviewed => Accepted
 * version:  5.0 => 4.2

Comment:

 Thank you for the report and screenshots! Replicated 👍

 For reference, this is how these examples looked on 4.1 (ignore the red
 dot)
 [[Image(image-20240425-090901.png)]]

 1 and 3 are regressions from 96a598356a9ea8c2c05b22cadc12e256a3b295fd, 2
 is a long standing issue.

 Unsure what is the best option for 1, because the grow behaviour looks
 better when there is help text.
 Happy to receive suggestions or to default to the previous behaviour.
 [[Image(image-20240425-092610.png)]]
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35404#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018f1429e5c7-55d6e273-c8e2-4f50-899d-941169166d63-00%40eu-central-1.amazonses.com.


Re: [Django] #35404: Admin fieldset multiple flexbox regressions

2024-04-25 Thread Django
#35404: Admin fieldset multiple flexbox regressions
+--
 Reporter:  minusf  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  contrib.admin   |  Version:  5.0
 Severity:  Normal  |   Resolution:
 Keywords:  css admin fieldset  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  1
+--
Changes (by Sarah Boyce):

 * Attachment "image-20240425-092610.png" added.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/35404>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018f1425c15f-9cfd4de7-4ad0-4e3e-b313-afd47cc6dc6f-00%40eu-central-1.amazonses.com.


Re: [Django] #35404: Admin fieldset multiple flexbox regressions

2024-04-25 Thread Django
#35404: Admin fieldset multiple flexbox regressions
+--
 Reporter:  minusf  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  contrib.admin   |  Version:  5.0
 Severity:  Normal  |   Resolution:
 Keywords:  css admin fieldset  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  1
+--
Changes (by Sarah Boyce):

 * Attachment "image-20240425-090901.png" added.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/35404>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018f14160eaf-2980c26b-2cc6-451c-ba84-e4f01700bd48-00%40eu-central-1.amazonses.com.