Re: [Django] #34737: SynchronousOnlyOperation is raised for non-running event loops on Python 3.7+. (was: Python 3.10 compatibility changes to utils/asyncio.py raise SynchronousOnlyOperation for non-r

2023-07-24 Thread Django
#34737: SynchronousOnlyOperation is raised for non-running event loops on Python
3.7+.
-+--
 Reporter:  wbastian-bh  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Utilities|  Version:  3.2
 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 the report, however according to
 [https://docs.python.org/3/library/asyncio-
 eventloop.html#asyncio.get_running_loop Python docs]
 `asyncio.get_running_loop()`:
 > ''"Return the running event loop in the current OS thread.''
 > ''Raise a RuntimeError if there is no running event loop."''
 If `asyncio.get_running_loop()` returns a non-running event loop for you,
 I'd consider this an issue in Python, not in Django itself.

-- 
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/010701898b3b16d1-b2915b29-1825-4553-b1ae-a8b04535805b-00%40eu-central-1.amazonses.com.


Re: [Django] #34686: Confirm/Add support for GEOS 3.12.

2023-07-24 Thread Django
#34686: Confirm/Add support for GEOS 3.12.
-+-
 Reporter:  Mariusz Felisiak |Owner:  Olivier
 |  Tabone
 Type:  New feature  |   Status:  assigned
Component:  GIS  |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Olivier Tabone):

 Update on this topic:

 spatialite 5.1.0 will support GEOS 3.12. There is a release candidate
 available.

 - https://groups.google.com/g/spatialite-
 users/c/hAJ2SgitN4M/m/VnuR2l1sBAAJ

 Will update the PR upon spatialite public release.

-- 
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/0107018989992507-af7e4a9e-25b0-4427-b436-aeb957b5a665-00%40eu-central-1.amazonses.com.


Re: [Django] #34712: Prevent misconfiguration of `STORAGES` setting

2023-07-24 Thread Django
#34712: Prevent misconfiguration of `STORAGES` setting
-+-
 Reporter:  Bruno Alla   |Owner:  Bruno
 Type:   |  Alla
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.staticfiles  |  Version:  4.2
 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
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"12ebd9a1ac8b1de34a2d4615fa830d132f6e56b9" 12ebd9a1]:
 {{{
 #!CommitTicketReference repository=""
 revision="12ebd9a1ac8b1de34a2d4615fa830d132f6e56b9"
 [4.2.x] Refs #34712 -- Doc'd that defining STORAGES overrides the default
 configuration.

 Backport of 86561844ce66cda3e6a8c22d4ace4c2d1bc1f2e7 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/01070189894d1ed8-02f1af36-f4b0-4407-9a70-4b78991792da-00%40eu-central-1.amazonses.com.


Re: [Django] #34712: Prevent misconfiguration of `STORAGES` setting

2023-07-24 Thread Django
#34712: Prevent misconfiguration of `STORAGES` setting
-+-
 Reporter:  Bruno Alla   |Owner:  Bruno
 Type:   |  Alla
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.staticfiles  |  Version:  4.2
 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
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"86561844ce66cda3e6a8c22d4ace4c2d1bc1f2e7" 86561844]:
 {{{
 #!CommitTicketReference repository=""
 revision="86561844ce66cda3e6a8c22d4ace4c2d1bc1f2e7"
 Refs #34712 -- Doc'd that defining STORAGES overrides the default
 configuration.
 }}}

-- 
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/01070189894caed2-c77662b0-ca8c-44e5-a0b5-0e0cf2a9cf02-00%40eu-central-1.amazonses.com.


Re: [Django] #34730: Add an assertMessages assertion

2023-07-24 Thread Django
#34730: Add an assertMessages assertion
-+-
 Reporter:  François Freitag |Owner:  François
 |  Freitag
 Type:  New feature  |   Status:  assigned
Component:  contrib.messages |  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 François Freitag):

 * needs_better_patch:  1 => 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/01070189891a1387-0196bfda-d94c-498d-b234-edc1e3390ca8-00%40eu-central-1.amazonses.com.


Re: [Django] #25342: Altitude of Point object for equality check

2023-07-24 Thread Django
#25342: Altitude of Point object for equality check
-+
 Reporter:  Bhargav Kowshik  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  GIS  |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  geodjango, equality  | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by Olivier Tabone):

 Prior 3.12.0, GEOS already has [https://github.com/libgeos/geos/pull/810
 multiple equality functions]:
 - `GEOSEquals` (which uses topological equality, returning true for
 different representations of the same structure)
 - `GEOSEqualsExact` (which uses pointwise equality, but allows for a
 distance tolerance and ignores Z/M values)

 currently, django uses
 [https://libgeos.org/doxygen/geos__c_8h.html#a23922c100edd72a8d82720213607e7bf
 GEOSEqualsExact] in the
 
[https://github.com/django/django/blob/95e4d6b81312fdd9f8ebf3385be1c1331168b5cf/django/contrib/gis/geos/geometry.py#L144
 __eq__() method] which is not a good fit regarding equality semantics when
 z is used (thus this ticket).

 `GEOSEquals()` does not work in 3D
 [https://libgeos.org/doxygen/geos__c_8h.html#a45499a7d87851015d36e57d285da9d8e
 as documented] which is not a good fit regarding equality semantics
 either.

 GEOS 3.12 introduces `GEOSEqualsIdentical` which is a good fit for
 python's equality semantic in 2D and 3D.

 I would suggest:
 - implementing the `GEOSGeometryBase.equals_identical()`  method,
 available if GEOS >= 3.12.0. That should be an easy call, pure additive.
 (new ticket ?)
 - raising a warning if `GEOSGeometryBase.__eq__()` is called with one
 operand having a third dimension (`geom.hasZ == True`). To fix this
 warning, one should either use an explicit comparaison method
 (`GEOSGeometryBase.equals()`,  `GEOSGeometryBase.equals_exact()`,
 `GEOSGeometryBase.equals_identical()`) or use a 2D point.
 - when GEOS 3.12 becomes the minimum supported version, use
 GEOSEqualsIdentical to perform  `GEOSGeometryBase.__eq__()`. This will
 give some time for one to adapt their code bases.

 What do you think ?

-- 
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/0107018988e522c0-dc30aad8-e3b1-46d4-9eb8-0299699c44ec-00%40eu-central-1.amazonses.com.


Re: [Django] #34730: Add an assertMessages assertion

2023-07-24 Thread Django
#34730: Add an assertMessages assertion
-+-
 Reporter:  François Freitag |Owner:  François
 |  Freitag
 Type:  New feature  |   Status:  assigned
Component:  contrib.messages |  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):

 * owner:  nobody => François Freitag
 * needs_better_patch:  0 => 1
 * status:  new => assigned
 * component:  Testing framework => contrib.messages
 * stage:  Unreviewed => Accepted


Comment:

 Replying to [comment:7 François Freitag]:
 > If we’re all in agreement with Tim’s proposal, I can move the helper to
 `django.contrib.messages.test`.

 Sounds good, tentatively 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/010701898881eea1-2faba1e8-9195-4d49-9f3d-8f41fcf9fa9e-00%40eu-central-1.amazonses.com.


Re: [Django] #34733: m2m_changed signal is unaware if .set() method is being called

2023-07-24 Thread Django
#34733: m2m_changed signal is unaware if .set() method is being called
-+-
 Reporter:  Leif Kjos|Owner:  Leif Kjos
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Leif Kjos):

 Replying to [comment:2 Mariusz Felisiak]:
 > Thanks for this ticket, however, signals are the last resort, required
 in really rare cases and could probably be avoided in yours. We don't want
 to add new features to them. Personally, I'd use a custom intermediate
 models, and add this logic to the `.create()` or `.save()` methods.
 >
 > Please see TicketClosingReasons/UseSupportChannels for ways to get help
 with Django usage, where folks can help you in re-designing this
 validation.
 >
 > You can start a discussion on DevelopersMailingList if you don't agree,
 where you'll reach a wider audience and see what other think, and
 [https://docs.djangoproject.com/en/stable/internals/contributing/triaging-
 tickets/#closing-tickets follow triaging guidelines with regards to
 wontfix tickets.]

 Thanks for the response! Will try that.

-- 
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/0107018988720441-75ffbb67-bae7-4685-bf92-7cc0acf2a191-00%40eu-central-1.amazonses.com.


Re: [Django] #34730: Add an assertMessages assertion

2023-07-24 Thread Django
#34730: Add an assertMessages assertion
---+--
 Reporter:  François Freitag   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  Testing framework  |  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by François Freitag):

 I agree, importing an optional, contrib app in the core of `django.test`
 isn’t great. The reason I chose to do it was to make the assertion more
 visible and easier to use.
 Note that the import from `django.contrib.messages` happens when the
 assertion is called, so the dependency only exists when the assertion is
 called. I thought it was an acceptable trade-off, but a contrib app
 assertion would still be available to projects who don’t use
 `django.contrib.messages`.

 Projects I worked on often added assertions or setUp/tearDown to
 `SimpleTestCase`, I assume that’s fairly common and shouldn’t be a big
 deal for others to add the mixin.

 If we’re all in agreement with Tim’s proposal, I can move the helper to
 `django.contrib.messages.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/0107018988698825-a867a5f3-130e-4d39-a2f2-26abbf842c02-00%40eu-central-1.amazonses.com.


Re: [Django] #34730: Add an assertMessages assertion

2023-07-24 Thread Django
#34730: Add an assertMessages assertion
---+--
 Reporter:  François Freitag   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  Testing framework  |  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Tim Graham):

 I agree that adding `SimpleTestCase` assertions for contrib packages is
 giving them inappropriate special privileges that third-party packages
 wouldn't get. Perhaps the assertion could live in a test case mixin in a
 module like `django.contrib.messages.tests` (matching the helpers in
 `contrib.admin.tests`).

-- 
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/010701898857f345-8296c1a1-60cb-452e-9c07-8e73c6efeac6-00%40eu-central-1.amazonses.com.


[Django] #34737: Python 3.10 compatibility changes to utils/asyncio.py raise SynchronousOnlyOperation for non-running event loops on python >= 3.7

2023-07-24 Thread Django
#34737: Python 3.10 compatibility changes to utils/asyncio.py raise
SynchronousOnlyOperation for non-running event loops on python >= 3.7
---+
   Reporter:  wbastian-bh  |  Owner:  nobody
   Type:  Bug  | Status:  new
  Component:  Utilities|Version:  3.2
   Severity:  Normal   |   Keywords:
   Triage Stage:  Unreviewed   |  Has patch:  0
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+
 **Env**
 Django 3.2.9+
 Python 3.7+

 **Overview**
 With this commit
 
(https://github.com/django/django/commit/53fad80ffe16ab4edb713b1ef0090d0fcf63565a),
 which was included with the 3.2.9 release if we're on PY3.7+, we raise
 SynchronousOnlyOperation when asyncio.get_running_loop returns an object
 without checking event_loop.is_running().

 It appears that asyncio.get_running_loop can return non-running loops, as
 observed by including a logging statement before raising the
 SynchronousOnlyOperation.

 If my understanding is correct, get_running_loop should only be returning
 running loops, and is not.

 Curious if we can continue to leverage event_loop.is_running() in all
 cases.

 **Observation Example**
 {{{
 import asyncio
 import functools
 import os
 ​
 from django.core.exceptions import SynchronousOnlyOperation
 from django.utils.version import PY37
 ​
 ​
 if PY37:
 get_running_loop = asyncio.get_running_loop
 else:
 get_running_loop = asyncio.get_event_loop
 ​
 ​
 def async_unsafe(message):
 """
 Decorator to mark functions as async-unsafe. Someone trying to access
 the function while in an async context will get an error message.
 """
 def decorator(func):
 @functools.wraps(func)
 def inner(*args, **kwargs):
 if not os.environ.get('DJANGO_ALLOW_ASYNC_UNSAFE'):
 # Detect a running event loop in this thread.
 try:
 event_loop = get_running_loop()
 except RuntimeError:
 pass
 else:
 if PY37 or event_loop.is_running():
 print(f"raising SynchronousOnlyOperation on
 {event_loop} where is_running = {event_loop.is_running()}")
 raise SynchronousOnlyOperation(message)
 # Pass onwards.
 return func(*args, **kwargs)
 return inner
 # If the message is actually a function, then be a no-arguments
 decorator.
 if callable(message):
 func = message
 message = 'You cannot call this from an async context - use a
 thread or sync_to_async.'
 return decorator(func)
 else:
 return decorator
 }}}

 **Observation Output**
 {{{
 raising SynchronousOnlyOperation on <_UnixSelectorEventLoop running=False
 closed=False debug=False> where is_running = False
 }}}

 **Steps to reproduce**
 1. Have a non-running event loop present and do just about anything in
 Django
 2. See SynchronousOnlyOperation raised

-- 
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/0107018988096cfb-1fdde7e8-9d9c-474a-a983-fd3eb4ddd7a8-00%40eu-central-1.amazonses.com.


Re: [Django] #34730: Add an assertMessages assertion

2023-07-24 Thread Django
#34730: Add an assertMessages assertion
---+--
 Reporter:  François Freitag   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  Testing framework  |  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by François Freitag):

 https://github.com/django/django/pull/17101/files#diff-
 801f0c08dc288b2efa15c535b8156c30e4d49d39aa24557ab389203e719f3556R2248
 gives an example of failure output.

-- 
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/0107018987f59087-dc7dfdee-26fc-4fa0-8d0b-9c9729cd405b-00%40eu-central-1.amazonses.com.


Re: [Django] #34730: Add an assertMessages assertion

2023-07-24 Thread Django
#34730: Add an assertMessages assertion
---+--
 Reporter:  François Freitag   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  Testing framework  |  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by François Freitag):

 Thanks for your input!
 Your suggestion addresses the two first pain points (retrieving messages
 from a response, and storing in a `list` for assertions).

 I see additional benefits with the suggested helper, because it is easier
 to define the expected result (using tuples instead of
 `django.contrib.messages.storage.base.Message` instances), and a failure
 has a readable output. Without such helper, one would at best get
 `''`
 not being equal to `''`.

-- 
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/0107018987f50651-1d7f68c1-2a7d-402c-abe7-d6f816ddd497-00%40eu-central-1.amazonses.com.


Re: [Django] #34730: Add an assertMessages assertion

2023-07-24 Thread Django
#34730: Add an assertMessages assertion
---+--
 Reporter:  François Freitag   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  Testing framework  |  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Mariusz Felisiak):

 Thanks for the ticket, however, I'm torn. Introducing app-specific logic
 in the Django's test classes doesn't sounds right to me. What do you think
 about instead adding a helper function to the
 `django.contrib.messages.utils` which would return messages for a
 response? e.g. `get_messages_from_test_client_response()`

-- 
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/0107018987d3a884-5a9fadc3-f021-413d-80e7-db3c3a8e5100-00%40eu-central-1.amazonses.com.


Re: [Django] #25643: Allow update() with aggregates and joins via subqueries

2023-07-24 Thread Django
#25643: Allow update() with aggregates and joins via subqueries
-+-
 Reporter:  jorgecarleitao   |Owner:  nobody
 Type:  New feature  |   Status:  new
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 Natalia Bidart):

 Hello Juan Pablo,

 Django is an open source project and the contributions come from community
 members, who work on tickets when they can, on what they can.

 You are welcome to try to work on this if there is an urgency. The
 [https://docs.djangoproject.com/en/dev/internals/contributing/writing-
 code/ contributing guide] is the best place to start.

 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/0107018987b55ff9-3a8ac9d0-bd30-4c8a-b68c-b1732fab47da-00%40eu-central-1.amazonses.com.


Re: [Django] #34362: FilteredRelation doesn’t support conditional expression

2023-07-24 Thread Django
#34362: FilteredRelation doesn’t support conditional expression
-+-
 Reporter:  zhu  |Owner:  Francesco
 |  Panico
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.1
  (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/0107018987a32c32-d47a1cc7-0ffc-4c3f-8598-962d96c87e70-00%40eu-central-1.amazonses.com.


Re: [Django] #34736: Position of Delete and Save Buttons are reversed in Admin whe moving from v4.1 to v4.2

2023-07-24 Thread Django
#34736: Position of Delete and Save Buttons are reversed in Admin whe moving 
from
v4.1 to v4.2
---+--
 Reporter:  awiebe |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  contrib.admin  |  Version:  4.2
 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:  1
---+--
Changes (by Mariusz Felisiak):

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


Comment:

 This was changed intentionally, check out #33728.

-- 
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/0107018987276f47-4fc80c05-0268-42b9-91eb-8924a10f240d-00%40eu-central-1.amazonses.com.


Re: [Django] #34736: Position of Delete and Save Buttons are reversed in Admin whe moving from v4.1 to v4.2

2023-07-24 Thread Django
#34736: Position of Delete and Save Buttons are reversed in Admin whe moving 
from
v4.1 to v4.2
---+--
 Reporter:  awiebe |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  4.2
 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:  1
---+--
Changes (by awiebe):

 * Attachment "bad buttons.png" added.

 Faulty button layout

-- 
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/0107018987218f22-3643e376-7903-46ff-9e27-ad88c2856460-00%40eu-central-1.amazonses.com.


[Django] #34736: Position of Delete and Save Buttons are reversed in Admin whe moving from v4.1 to v4.2

2023-07-24 Thread Django
#34736: Position of Delete and Save Buttons are reversed in Admin whe moving 
from
v4.1 to v4.2
-+
   Reporter:  awiebe |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  contrib.admin  |Version:  4.2
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  1  |
-+
 The formatting of the ModelAdmin form seems to have gotten screwed up in
 version 4.2 such that the delete button appears in the bottom right where
 one would normally expect the **save** and **save and continue** options.

 I read left to right, and this is the way it has worked for all prior
 versions of Django, so assume this is a defect and not a spontaneous
 design decision.

 My browser is Chrome 116.0.5845.42 in case the CSS looks fine on your end
 but happens to be broken in its rendering engine.

-- 
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/0107018987200b20-c59271da-d225-4897-9429-55b6cf483bb9-00%40eu-central-1.amazonses.com.


Re: [Django] #34735: About form validation

2023-07-24 Thread Django
#34735: About form validation
-+-
 Reporter:  Anis |Owner:  Anis
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Forms|  Version:  4.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  forms| Triage Stage:
  ValidationError|  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:

 Anis, please don't reopen closed tickets.

-- 
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/0107018987158779-aa6dcb9b-7590-40a4-8cef-dad7f87829c1-00%40eu-central-1.amazonses.com.


Re: [Django] #34735: About form validation

2023-07-24 Thread Django
#34735: About form validation
-+-
 Reporter:  Anis |Owner:  Anis
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Forms|  Version:  4.2
 Severity:  Normal   |   Resolution:
 Keywords:  forms| Triage Stage:
  ValidationError|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Anis):

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


-- 
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/010701898714b94f-c1b7f359-6618-4daa-a8a0-3f7e29c3636b-00%40eu-central-1.amazonses.com.


Re: [Django] #34735: About form validation

2023-07-24 Thread Django
#34735: About form validation
-+-
 Reporter:  Anis |Owner:  Anis
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Forms|  Version:  4.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  forms| Triage Stage:
  ValidationError|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Anis):

 * type:  Uncategorized => Cleanup/optimization


-- 
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/0107018987145cc2-3daef440-c5c5-418d-9769-a226e89aa148-00%40eu-central-1.amazonses.com.


Re: [Django] #34532: Form.default_renderer is ignored in formsets.

2023-07-24 Thread Django
#34532: Form.default_renderer is ignored in formsets.
-+-
 Reporter:  Ryan Burt|Owner:  David
 |  Smith
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  4.2
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  default_renderer | 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:"95e4d6b81312fdd9f8ebf3385be1c1331168b5cf" 95e4d6b]:
 {{{
 #!CommitTicketReference repository=""
 revision="95e4d6b81312fdd9f8ebf3385be1c1331168b5cf"
 Fixed #34532 -- Made formset_factory() respect Form's default_renderer.

 Co-authored-by: David Smith 
 }}}

-- 
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/0107018986e6c035-081fde9c-98cc-40ab-8a6a-01a28adf11a0-00%40eu-central-1.amazonses.com.


Re: [Django] #34735: About form validation

2023-07-24 Thread Django
#34735: About form validation
-+-
 Reporter:  Anis |Owner:  Anis
 Type:  Uncategorized|   Status:  closed
Component:  Forms|  Version:  4.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  forms| Triage Stage:
  ValidationError|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

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


Comment:

 Please don't use Trac as a support channel. If you're having trouble
 understanding how Django works, see
 TicketClosingReasons/UseSupportChannels for ways to get help.

-- 
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/0107018986e5d786-58d85f18-7811-487e-94b5-a5cb62bf1493-00%40eu-central-1.amazonses.com.


Re: [Django] #34735: About form validation

2023-07-24 Thread Django
#34735: About form validation
-+-
 Reporter:  mrtemp2  |Owner:  mrtemp2
 Type:  Uncategorized|   Status:  assigned
Component:  Forms|  Version:  4.2
 Severity:  Normal   |   Resolution:
 Keywords:  forms| Triage Stage:
  ValidationError|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by mrtemp2):

 * cc: mrtemp2 (removed)
 * owner:  nobody => mrtemp2
 * 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/0107018986e45084-81acb8ed-eb1d-4faf-b713-4803effdecf4-00%40eu-central-1.amazonses.com.


Re: [Django] #34735: About form validation

2023-07-24 Thread Django
#34735: About form validation
-+-
 Reporter:  mrtemp2  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Forms|  Version:  4.2
 Severity:  Normal   |   Resolution:
 Keywords:  forms| Triage Stage:
  ValidationError|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by mrtemp2):

 * cc: mrtemp2 (added)
 * keywords:   => forms ValidationError
 * component:  Uncategorized => Forms


-- 
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/0107018986e3df1b-ebd64e1f-4b03-4017-8c66-38deebc290ec-00%40eu-central-1.amazonses.com.


[Django] #34735: About form validation

2023-07-24 Thread Django
#34735: About form validation
-+
   Reporter:  mrtemp2|  Owner:  nobody
   Type:  Uncategorized  | Status:  new
  Component:  Uncategorized  |Version:  4.2
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 Greeting i'm trying to customise the ValidationError  message i got this
 "veuillez renseigner ce champ" as a toolip under the input field my web
 site is in other language and already setup in settings.py this is my
 forms.py
 {{{
 class OrganismForm(forms.ModelForm):

 class Meta:
 model = Organism
 fields = ['code', 'name', 'parent', 'region']
 exclude = []
 widgets = {
 'code': forms.TextInput(attrs={'class': 'form-control form-
 control-outline',
'placeholder':'Placeholder' ,
'data-listener-
 added_b000d9d8':'true'}),
 'name': forms.TextInput(attrs={'class': 'form-control form-
 control-outline',
'placeholder':'Placeholder' ,
'data-listener-
 added_b000d9d8':'true'}),
 'parent': forms.Select(attrs={'class': 'select select2-hidden-
 accessible',
 }),
 'region': forms.Select(attrs={'class': 'select select2-hidden-
 accessible',
 }),
 }
 localized_fields = None
 labels = {}
 help_texts = {}
 error_messages = {}

 def __init__(self, *args, **kwargs):
 return super(OrganismForm, self).__init__(*args, **kwargs)

 def is_valid(self):
 return super(OrganismForm, self).is_valid()

 def full_clean(self):
 return super(OrganismForm, self).full_clean()

 def clean_code(self):
 code = self.cleaned_data.get("code", None)
 return code

 def clean_name(self):
 name = self.cleaned_data.get("name", None)
 if not name:
 raise ValidationError('custom text message.')
 return name

 def clean_parent(self):
 parent = self.cleaned_data.get("parent", None)
 return parent

 def clean_region(self):
 region = self.cleaned_data.get("region", None)
 return region

 def clean(self):
 return super(OrganismForm, self).clean()

 def validate_unique(self):
 return super(OrganismForm, self).validate_unique()

 def save(self, commit=True):
 return super(OrganismForm, self).save(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/0107018986e2fb4f-2f0fafeb-0c1b-4507-a391-1bee5fdbbb74-00%40eu-central-1.amazonses.com.


Re: [Django] #34532: Form.default_renderer is ignored in formsets.

2023-07-24 Thread Django
#34532: Form.default_renderer is ignored in formsets.
-+-
 Reporter:  Ryan Burt|Owner:  David
 |  Smith
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  4.2
 Severity:  Normal   |   Resolution:
 Keywords:  default_renderer | 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/0107018986c04bbf-44a98911-f2c9-4739-9596-b14ff4741d27-00%40eu-central-1.amazonses.com.


Re: [Django] #34714: Async support for get_object_or_404()/get_list_or_404().

2023-07-24 Thread Django
#34714: Async support for get_object_or_404()/get_list_or_404().
-+-
 Reporter:  patagoniapy  |Owner:  Olivier
 |  Tabone
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 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:"b9473cac65190822e7c94f695f1f7b4d5b49502a" b9473cac]:
 {{{
 #!CommitTicketReference repository=""
 revision="b9473cac65190822e7c94f695f1f7b4d5b49502a"
 Fixed #34714 -- Added aget_object_or_404()/aget_list_or_404() shortcuts.
 }}}

-- 
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/0107018986b72174-1b979339-7a27-4831-860c-8641dfaeaf06-00%40eu-central-1.amazonses.com.


Re: [Django] #34262: Queryset grouped by annotation with aggregates on another annotated expression crashes on MySQL with sql_mode=only_full_group_by.

2023-07-24 Thread Django
#34262: Queryset grouped by annotation with aggregates on another annotated
expression crashes on MySQL with sql_mode=only_full_group_by.
-+-
 Reporter:  Mariusz Felisiak |Owner:  Jonny
 |  Park
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  mysql| Triage Stage:  Accepted
  only_full_group_by |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Jonny Park):

 * owner:  nobody => Jonny Park
 * 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/0107018986b1af44-a3476e0a-1b2d-4ef3-a7b2-8b3340c3046e-00%40eu-central-1.amazonses.com.