Re: [Django] #31169: Allow parallel test runner to work with Windows/macOS `spawn` process start method.

2022-02-13 Thread Django
#31169: Allow parallel test runner to work with Windows/macOS `spawn` process 
start
method.
---+---
 Reporter:  Brandon Navra  |Owner:  David Smith
 Type:  New feature|   Status:  assigned
Component:  Testing framework  |  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 David Smith):

 * owner:  Ahmad A. Hussein => David Smith
 * 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/068.527bfdc375764666cf99f7576db02fe5%40djangoproject.com.


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2022-02-13 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
-+-
 Reporter:  Flavio Curella   |Owner:  Flavio
 |  Curella
 Type:  New feature  |   Status:  closed
Component:  Error reporting  |  Version:  dev
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  runserver logging| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"cdd4ff67d23b80741047eaf6b180dc67a782dfbd" cdd4ff67]:
 {{{
 #!CommitTicketReference repository=""
 revision="cdd4ff67d23b80741047eaf6b180dc67a782dfbd"
 Refs #25684 -- Removed double newline from request/response output of
 runserver.

 Follow up to 0bc5cd628042bf0a44df60a93085a4f991a84dfb.
 }}}

-- 
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.20ea3cc6e0903c1f12c6f48ba6d7b54f%40djangoproject.com.


Re: [Django] #33512: Creating a child instance with a parent containing DateTimeField(auto_add_now=True) raises IntegrityError. (was: DateTimeField auto_add_now is NUL when creating child model object

2022-02-13 Thread Django
#33512: Creating a child instance with a parent containing
DateTimeField(auto_add_now=True) raises IntegrityError.
-+-
 Reporter:  Eriks K  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  auto_add_now | 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:   => duplicate


Old description:

> Description:
> When creating Model object which inherits from other Model which has
> `DateTimeField` with `auto_add_now=True` and passing `parent_ptr_id`
> value, then Django tries to update base Model by setting the auto_now_add
> field to NUL (although the field is null=False)
>
> Expected result:
> ChildModel instance created with a link to ParentModel.
>
> Code examples:
> `models.py`
> {{{
> class ParentModel(models.Model):
> created = models.DateTimeField(auto_now_add=True)
> modified = models.DateTimeField(auto_now=True)
>

> class ChildModel(SomeBaseModel):
> some_field = models.CharField(max_length=12)
> }}}
>
> `manage.py shell`
> {{{
> from app.models import ParentModel, ChildModel
> parent_object = ParentModel.objects.create()  # OK
> ChildModel.objects.create()  # OK
> ChildModel.objects.create(parentmodel_ptr=parent_object)  #
> IntegrityError
> }}}
>
> Actual result:
> Django tries to update ParentModel's `created` with NULL
> {{{
> UPDATE "app_parentmodel" SET "created" = NULL, "modified" = ? WHERE
> "app_parentmodel"."id" = ?
> }}}
> And raises
> {{{
> django.db.utils.IntegrityError: NOT NULL constraint failed:
> app_parentmodel.created
> }}}
>

> Noticed in Django 2.2, reproduced in 3.2 and 4.0. with both Postgres and
> SQlite database backends.
> [https://github.com/eeriks/django-demo Demo project on GitHub] to
> reproduce bug.

New description:

 Description:
 When creating Model object which inherits from other Model which has
 `DateTimeField` with `auto_add_now=True` and passing `parent_ptr_id`
 value, then Django tries to update base Model by setting the auto_now_add
 field to NUL (although the field is null=False)

 Expected result:
 ChildModel instance created with a link to ParentModel.

 Code examples:
 `models.py`
 {{{
 class ParentModel(models.Model):
 created = models.DateTimeField(auto_now_add=True)
 modified = models.DateTimeField(auto_now=True)


 class ChildModel(ParentModel):
 some_field = models.CharField(max_length=12)
 }}}

 `manage.py shell`
 {{{
 from app.models import ParentModel, ChildModel
 parent_object = ParentModel.objects.create()  # OK
 ChildModel.objects.create()  # OK
 ChildModel.objects.create(parentmodel_ptr=parent_object)  # IntegrityError
 }}}

 Actual result:
 Django tries to update ParentModel's `created` with NULL
 {{{
 UPDATE "app_parentmodel" SET "created" = NULL, "modified" = ? WHERE
 "app_parentmodel"."id" = ?
 }}}
 And raises
 {{{
 django.db.utils.IntegrityError: NOT NULL constraint failed:
 app_parentmodel.created
 }}}


 Noticed in Django 2.2, reproduced in 3.2 and 4.0. with both Postgres and
 SQlite database backends.
 [https://github.com/eeriks/django-demo Demo project on GitHub] to
 reproduce bug.

--

Comment:

 Thanks for the report! It looks like a different scenario for the same
 issue as described in #24539.

-- 
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.4c1bbee35013ee4ba4d9280d10d27bc2%40djangoproject.com.


Re: [Django] #24539: Attempt to create object with repeated value on a custom PK raises IntegrityError on wrong field

2022-02-13 Thread Django
#24539: Attempt to create object with repeated value on a custom PK raises
IntegrityError on wrong field
-+-
 Reporter:  Evandro Myller   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.7
  (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 Mariusz Felisiak):

 #33512 was a duplicate, for creating a child instance with a manually
 assigned parent containing `DateTimeField(auto_add_now=True)`.

-- 
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.8d6b40022c155edd1300f78c7509ab02%40djangoproject.com.


Re: [Django] #27471: Make admin's list_filter choices collapsable

2022-02-13 Thread Django
#27471: Make admin's list_filter choices collapsable
-+-
 Reporter:  Greg McCoy   |Owner:  Marcelo
 |  Galigniana
 Type:  New feature  |   Status:  assigned
Component:  contrib.admin|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:  filter admin | Triage Stage:  Accepted
  collaspe   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by Marcelo Galigniana):

 * needs_better_patch:  1 => 0


Comment:

 Here I add the 2nd approach [https://github.com/django/django/pull/15424
 PR] using [https://developer.mozilla.org/en-
 US/docs/Web/HTML/Element/summary summary/details elements]

-- 
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.74b4b5900c8e6057a49dd029e164c880%40djangoproject.com.


Re: [Django] #28358: LazyObject defines attribute that don't exist on wrapped object

2022-02-13 Thread Django
#28358: LazyObject defines attribute that don't exist on wrapped object
-+-
 Reporter:  Andrey Fedoseev  |Owner:  Theofilos
 |  Alexiou
 Type:  Bug  |   Status:  assigned
Component:  Utilities|  Version:  1.11
 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 Theofilos Alexiou):

 * needs_better_patch:  1 => 0


Comment:

 [https://github.com/django/django/pull/15423 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/072.55205542ecb1f121c0702ad3a166d859%40djangoproject.com.


Re: [Django] #28358: LazyObject defines attribute that don't exist on wrapped object

2022-02-13 Thread Django
#28358: LazyObject defines attribute that don't exist on wrapped object
-+-
 Reporter:  Andrey Fedoseev  |Owner:  Theofilos
 |  Alexiou
 Type:  Bug  |   Status:  assigned
Component:  Utilities|  Version:  1.11
 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 Theofilos Alexiou):

 * owner:  (none) => Theofilos Alexiou
 * 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/072.d56a0fcdce50f6ac0947859fce6ff0b0%40djangoproject.com.


Re: [Django] #33497: Database persistent connections do not work with ASGI in 4.0

2022-02-13 Thread Django
#33497: Database persistent connections do not work with ASGI in 4.0
-+-
 Reporter:  Stenkar  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  4.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  ASGI; Database   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Florian Apolloner):

 Thinking more about this I do not think the problem is new. We have the
 same problem when persistent connections are used and a new thread is
 generated per request (for instance in runserver.py). Usually (ie with
 gunicorn etc) one has a rather "stable" pool of processes or requests; as
 soon as you switch to new threads per connection this will break. In ASGI
 this behavior is probably more pronounced since by definition every
 request is in it's own async task context which then propagates down to
 the db backend as new connection per request (which in turn will also
 never reuse connections because the "thread" ids change).

 All in all I think we are finally at the point where we need a connection
 pool in Django. I'd strongly recommend to use something like
 https://github.com/psycopg/psycopg/tree/master/psycopg_pool/psycopg_pool
 but abstracted to work for all databases in Django.

-- 
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.91053f1b76664405463a4b3f47a725a0%40djangoproject.com.