Re: [Django] #33753: Docs' Makefile doesn't support Sphinx 5+.

2022-05-31 Thread Django
#33753: Docs' Makefile doesn't support Sphinx 5+.
-+-
 Reporter:  Doug Hellmann|Owner:  Mariusz
 |  Felisiak
 Type:  Bug  |   Status:  assigned
Component:  Documentation|  Version:  dev
 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 Carlton Gibson):

 * 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/010701811dd6b411-6bf94e3c-a9f5-4798-acc9-8060674fe807-00%40eu-central-1.amazonses.com.


Re: [Django] #29381: Move some parts of `django.contrib.auth.models` to `django.contrib.auth.base_user` for reusability

2022-05-31 Thread Django
#29381: Move some parts of `django.contrib.auth.models` to
`django.contrib.auth.base_user` for reusability
---+
 Reporter:  Sagar Chalise  |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  contrib.auth   |  Version:  dev
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  1
  Needs tests:  1  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Abhijeet Pal):

 Hi, the ticket https://code.djangoproject.com/ticket/20313 was never
 merged. Do you this ticket is still relevant then maybe I can contribute
 to it without worrying about 20313?

-- 
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/010701811d2a8e90-cdff237a-edcb-4fa4-ab2e-68eb239b260d-00%40eu-central-1.amazonses.com.


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

2022-05-31 Thread Django
#32813: Display development server address after server bind
-+-
 Reporter:  fmwviormv|Owner:  Abhijeet
 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
-+-

Comment (by Abhijeet Pal):

 PR  https://github.com/django/django/pull/15748

-- 
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/010701811cf792dc-eda05188-8efa-479c-a755-26fde1898be7-00%40eu-central-1.amazonses.com.


Re: [Django] #33756: Code Cleanup on Tutorial Part 3

2022-05-31 Thread Django
#33756: Code Cleanup on Tutorial Part 3
-+-
 Reporter:  Kaleb Nyquist|Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Documentation|  Version:  4.0
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:
 |  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:  new => closed
 * resolution:   => invalid


Old description:

> In the "Writing Your First App" Tutorial Part 3, under the subsection
> "Write Views That Actually Do Something"
> (https://docs.djangoproject.com/en/4.0/intro/tutorial03/#write-views-
> that-actually-do-something), there is an explanation of the render()
> shortcut as an alternative to HttpResponse() + loader. The explanation
> includes two code snippets for comparison.
>
> One difference between the code snippets that obfuscates rather than
> illuminates the difference is the line(s):
>
> context = {
> 'latest_question_list': latest_question_list,
> }
>
> and
>
> context = {'latest_question_list': latest_question_list}
>
> If this was consistently a multiline or single line across the snippets,
> that would make it easier for beginning Django users to glance at and
> understand the difference.
>
> Screenshot attached to illustrate.

New description:

 In the "Writing Your First App" Tutorial Part 3, under the subsection
 "Write Views That Actually Do Something"
 (https://docs.djangoproject.com/en/4.0/intro/tutorial03/#write-views-that-
 actually-do-something), there is an explanation of the render() shortcut
 as an alternative to HttpResponse() + loader. The explanation includes two
 code snippets for comparison.

 One difference between the code snippets that obfuscates rather than
 illuminates the difference is the line(s):
 {{{
 context = {
 'latest_question_list': latest_question_list,
 }
 }}}
 and
 {{{
 context = {'latest_question_list': latest_question_list}
 }}}
 If this was consistently a multiline or single line across the snippets,
 that would make it easier for beginning Django users to glance at and
 understand the difference.

 Screenshot attached to illustrate.

--

Comment:

 Thanks for the report, however we try to avoid trivial code reformatting
 unless it's a big problem as it creates extra noise in the history. I
 don't think this affects the readability of these snippets.

-- 
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/010701811afc05da-695b41af-66f1-4759-bc27-a943cb73a39e-00%40eu-central-1.amazonses.com.


Re: [Django] #33756: Code Cleanup on Tutorial Part 3

2022-05-31 Thread Django
#33756: Code Cleanup on Tutorial Part 3
-+-
 Reporter:  KalebNyquist |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Documentation|  Version:  4.0
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Description changed by KalebNyquist:

Old description:

> In the "Writing Your First App" Tutorial Part 3, under the subsection
> "Write Views That Actually Do Something"
> (https://docs.djangoproject.com/en/4.0/intro/tutorial03/#write-views-
> that-actually-do-something), there is an explanation of the render()
> shortcut as an alternative to HttpResponse() + loader. The explanation
> includes two code snippets for comparison.
>
> One difference between the code snippets that obfuscates rather than
> illuminates the difference is the line(s):
>
> context = {
> 'latest_question_list': latest_question_list,
> }
>
> and
>
> context = {'latest_question_list': latest_question_list}
>
> If this was consistently a multiline or single line across the snippets,
> that would make it easier for beginning Django users to glance at and
> understand the difference.

New description:

 In the "Writing Your First App" Tutorial Part 3, under the subsection
 "Write Views That Actually Do Something"
 (https://docs.djangoproject.com/en/4.0/intro/tutorial03/#write-views-that-
 actually-do-something), there is an explanation of the render() shortcut
 as an alternative to HttpResponse() + loader. The explanation includes two
 code snippets for comparison.

 One difference between the code snippets that obfuscates rather than
 illuminates the difference is the line(s):

 context = {
 'latest_question_list': latest_question_list,
 }

 and

 context = {'latest_question_list': latest_question_list}

 If this was consistently a multiline or single line across the snippets,
 that would make it easier for beginning Django users to glance at and
 understand the difference.

 Screenshot attached to illustrate.

--

-- 
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/010701811acf3ab8-b18571dc-2072-486b-9318-5336603b7534-00%40eu-central-1.amazonses.com.


Re: [Django] #33756: Code Cleanup on Tutorial Part 3

2022-05-31 Thread Django
#33756: Code Cleanup on Tutorial Part 3
-+-
 Reporter:  KalebNyquist |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Documentation|  Version:  4.0
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by KalebNyquist):

 * Attachment "screenshot.png" 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/010701811ace78a7-0c5b9de0-0f55-423b-b761-6736bfb6066b-00%40eu-central-1.amazonses.com.


[Django] #33756: Code Cleanup on Tutorial Part 3

2022-05-31 Thread Django
#33756: Code Cleanup on Tutorial Part 3
+
   Reporter:  KalebNyquist  |  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Documentation |Version:  4.0
   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 |
+
 In the "Writing Your First App" Tutorial Part 3, under the subsection
 "Write Views That Actually Do Something"
 (https://docs.djangoproject.com/en/4.0/intro/tutorial03/#write-views-that-
 actually-do-something), there is an explanation of the render() shortcut
 as an alternative to HttpResponse() + loader. The explanation includes two
 code snippets for comparison.

 One difference between the code snippets that obfuscates rather than
 illuminates the difference is the line(s):

 context = {
 'latest_question_list': latest_question_list,
 }

 and

 context = {'latest_question_list': latest_question_list}

 If this was consistently a multiline or single line across the snippets,
 that would make it easier for beginning Django users to glance at and
 understand the difference.

-- 
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/010701811ace0701-10c12555-6774-4368-a1af-55d234b5bdc2-00%40eu-central-1.amazonses.com.


Re: [Django] #28897: QuerySet.update() raises FieldError on queryset ordered by an annotated field.

2022-05-31 Thread Django
#28897: QuerySet.update() raises FieldError on queryset ordered by an annotated
field.
-+-
 Reporter:  Colton Hicks |Owner:  David
 |  Wobrock
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  Admin Interface, | Triage Stage:  Accepted
  Custom Action, Annotated Field,|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by David Wobrock):

 * cc: David Wobrock (added)
 * owner:  nobody => David Wobrock
 * has_patch:  0 => 1
 * status:  new => assigned


Comment:

 The suggested code seems to fix it indeed :)

 I could only reproduce when annotating/ordering on a ManyToManyField.
 I used the snippet that keeps some `order_by` and doesn't clear it
 entirely ¯\_(ツ)_/¯
 [https://github.com/django/django/pull/15747 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/010701811aa4cf46-bb10229e-454c-4d11-a2ac-aecab7125a3c-00%40eu-central-1.amazonses.com.


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

2022-05-31 Thread Django
#32813: Display development server address after server bind
-+-
 Reporter:  fmwviormv|Owner:  Abhijeet
 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 Abhijeet Pal):

 * owner:  fmwviormv => Abhijeet


Comment:

 Hi, there has not been any activity in the last 12 months and the original
 PR  was closed. I am assigning the ticket to myself to move it forward.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701811a7917a9-eaa801c2-2574-42f8-a4c3-632e4d0b0046-00%40eu-central-1.amazonses.com.


Re: [Django] #33308: Add psycopg3 backend

2022-05-31 Thread Django
#33308: Add psycopg3 backend
-+-
 Reporter:  Paolo Melchiorre |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  database postgresql  | Triage Stage:  Accepted
  backend orm|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Maciej Olko):

 * cc: Maciej Olko (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/010701811a700f37-d938f259-3911-46d7-a915-93d1962e7e45-00%40eu-central-1.amazonses.com.


Re: [Django] #33755: Move ASGI body-file cleanup into ASGIRequest

2022-05-31 Thread Django
#33755: Move ASGI body-file cleanup into ASGIRequest
-+-
 Reporter:  Carlton Gibson   |Owner:  Jonas
 Type:   |  Lundberg
  Cleanup/optimization   |   Status:  assigned
Component:  HTTP handling|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  ASGI | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Carlton Gibson):

 Hey Jonas, thanks for looking so quickly!

 > Thoughts?

 Initially it would be to sketch out the tests for the cases we need to
 cover... — then is making them pass feasible?

 > ...property drops the reference to the `body_file` by overwriting it
 with a `BytesIO`

 Grrr. Yes... Is the file closed when references hit zero? And can we `del`
 the higher `handle()` to make sure it's not retained there? 樂 — Need to
 have a look. Otherwise, yes, explicitly closing would be needed.

 It could well be that combinations of `stream`/`read`/`body` usage mean we
 have to say `wontfix` — but it'd be nice to be clear on that if we do have
 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/010701811976ccf2-5286ac9d-06f9-4408-8e8c-c063a65f4c09-00%40eu-central-1.amazonses.com.


Re: [Django] #33700: APPEND_SLASH adds significant latency to all requests not ending in / (even if successful)

2022-05-31 Thread Django
#33700: APPEND_SLASH adds significant latency to all requests not ending in / 
(even
if successful)
-+-
 Reporter:  Anders Kaseorg   |Owner:  Anders
 Type:   |  Kaseorg
  Cleanup/optimization   |   Status:  assigned
Component:  HTTP handling|  Version:  4.0
 Severity:  Normal   |   Resolution:
 Keywords:  CommonMiddleware | 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 Carlton Gibson):

 * stage:  Accepted => Ready for checkin


Comment:

 This looks correct to me. #24720 (1.9) originally addressed the
 performance issue of the check in `process_request`. This looks like it
 regressed in #26293 (1.10) which handled the orthogonal logging issue. The
 test changes in the PR here change to verify the whole middleware
 behaviour, rather than just process_response. That looks OK.

 I'll mark RFC, and leave for a period to allow others to check if they
 wish, since CommonMiddleware is always sensitive.

-- 
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/010701811968cd29-40c77d7c-bf97-421d-9c0b-cf0059ed392c-00%40eu-central-1.amazonses.com.


Re: [Django] #33191: Avoid unnecessary clear of cached reference

2022-05-31 Thread Django
#33191: Avoid unnecessary clear of cached reference
-+-
 Reporter:  Barry Johnson|Owner:
 Type:   |  AllenJonathan
  Cleanup/optimization   |   Status:  closed
Component:  Database layer   |  Version:  3.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:"1058fc7023d04d07c22a5e667b6a446705119b14" 1058fc70]:
 {{{
 #!CommitTicketReference repository=""
 revision="1058fc7023d04d07c22a5e667b6a446705119b14"
 Fixed #33191 -- Avoided clearing cached reference when saving child after
 parent.

 Thanks Barry Johnson for the report.
 }}}

-- 
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/01070181195d2c7b-db315423-7721-4f5e-aa32-521680c0047c-00%40eu-central-1.amazonses.com.


Re: [Django] #33191: Avoid unnecessary clear of cached reference

2022-05-31 Thread Django
#33191: Avoid unnecessary clear of cached reference
-+-
 Reporter:  Barry Johnson|Owner:
 Type:   |  AllenJonathan
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  3.2
  (models, ORM)  |
 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/01070181193487e3-104c754c-e3bc-45a6-8d49-69be1910fee3-00%40eu-central-1.amazonses.com.


Re: [Django] #33755: Move ASGI body-file cleanup into ASGIRequest

2022-05-31 Thread Django
#33755: Move ASGI body-file cleanup into ASGIRequest
-+-
 Reporter:  Carlton Gibson   |Owner:  Jonas
 Type:   |  Lundberg
  Cleanup/optimization   |   Status:  assigned
Component:  HTTP handling|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  ASGI | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Jonas Lundberg):

 Hmm, only closing the {{{body_file}}} once read would leave it unclosed if
 the body wasn't touched.

 Maybe we also need to implement your suggested {{{__del__}} to handle that
 case as well, closing either the {{{body_file}}} or the {{{BytesIO}}} for
 read body.

-- 
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/01070181192fd44f-27257784-156d-44d5-9729-5aa35b5c532a-00%40eu-central-1.amazonses.com.


Re: [Django] #33755: Move ASGI body-file cleanup into ASGIRequest

2022-05-31 Thread Django
#33755: Move ASGI body-file cleanup into ASGIRequest
-+-
 Reporter:  Carlton Gibson   |Owner:  Jonas
 Type:   |  Lundberg
  Cleanup/optimization   |   Status:  assigned
Component:  HTTP handling|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  ASGI | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Jonas Lundberg):

 Looked at this briefly and unfortunately the {{{HttpRequest.body}}}
 property drops the reference to the {{{body_file}}} by overwriting it with
 a {{{BytesIO}}}.

 {{{
 @property
 def body(self):
 if ...
 self._stream = BytesIO(self._body)
 return self._body
 }}}

 I'm thinking it could be safe to close the file in a finally block once it
 have been read ...

 {{{
 diff --git a/django/http/request.py b/django/http/request.py
 index 4b160bc..5e5f349 100644
 --- a/django/http/request.py
 +++ b/django/http/request.py
 @@ -400,14 +400,16 @@ class HttpRequest:

  def read(self, *args, **kwargs):
  self._read_started = True
  try:
  return self._stream.read(*args, **kwargs)
  except OSError as e:
  raise UnreadablePostError(*e.args) from e
 +finally:
 +self._stream.close()
 }}}

 At least the test from #33754 still succeeds ;-)

 Thoughts?

-- 
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/01070181192701d4-8c0d1279-eed5-400e-90a8-293e17bc1eea-00%40eu-central-1.amazonses.com.


Re: [Django] #33754: Request body is closed prematurely by the ASGI handler

2022-05-31 Thread Django
#33754: Request body is closed prematurely by the ASGI handler
-+-
 Reporter:  Jonas Lundberg   |Owner:  Jonas
 |  Lundberg
 Type:  Bug  |   Status:  closed
Component:  HTTP handling|  Version:  4.1
 Severity:  Release blocker  |   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:"6df6c1b9704f6b22d23b3b4c5813bd9e0ab719c1" 6df6c1b]:
 {{{
 #!CommitTicketReference repository=""
 revision="6df6c1b9704f6b22d23b3b4c5813bd9e0ab719c1"
 [4.1.x] Fixed #33754 -- Fixed crash with prematurely closed ASGI request
 body.

 Regression in 441103a04d1d167dc870eaaf90e3fba974f67c93.

 Backport of f1e0fc645bb0b2c15d1510c9a8501743297dec9d 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/01070181190abeb7-ee5e6cfb-22e7-4df3-ad04-52349df7e833-00%40eu-central-1.amazonses.com.


Re: [Django] #33754: Request body is closed prematurely by the ASGI handler

2022-05-31 Thread Django
#33754: Request body is closed prematurely by the ASGI handler
-+-
 Reporter:  Jonas Lundberg   |Owner:  Jonas
 |  Lundberg
 Type:  Bug  |   Status:  closed
Component:  HTTP handling|  Version:  4.1
 Severity:  Release blocker  |   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 Mariusz Felisiak ):

 In [changeset:"f1e0fc645bb0b2c15d1510c9a8501743297dec9d" f1e0fc6]:
 {{{
 #!CommitTicketReference repository=""
 revision="f1e0fc645bb0b2c15d1510c9a8501743297dec9d"
 Fixed #33754 -- Fixed crash with prematurely closed ASGI request body.

 Regression in 441103a04d1d167dc870eaaf90e3fba974f67c93.
 }}}

-- 
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/01070181190abf48-eb5e0937-8bb6-4d36-8d2a-e47ae9289cad-00%40eu-central-1.amazonses.com.


Re: [Django] #33755: Move ASGI body-file cleanup into ASGIRequest

2022-05-31 Thread Django
#33755: Move ASGI body-file cleanup into ASGIRequest
-+-
 Reporter:  Carlton Gibson   |Owner:  Jonas
 Type:   |  Lundberg
  Cleanup/optimization   |   Status:  assigned
Component:  HTTP handling|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  ASGI | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Jonas Lundberg):

 * owner:  nobody => Jonas Lundberg
 * 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/01070181190a931e-85fbe09f-3fa9-4e42-b5d6-ea6ff27bda26-00%40eu-central-1.amazonses.com.


Re: [Django] #33422: Document @isolate_apps

2022-05-31 Thread Django
#33422: Document @isolate_apps
-+-
 Reporter:  Adam Johnson |Owner:
 Type:   |  Christopher Adams
  Cleanup/optimization   |   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:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  0 => 1
 * 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/0107018118fc1231-f759a366-4ea1-45a0-bee0-889f0032a35f-00%40eu-central-1.amazonses.com.


Re: [Django] #33755: Move ASGI body-file cleanup into ASGIRequest

2022-05-31 Thread Django
#33755: Move ASGI body-file cleanup into ASGIRequest
--+
 Reporter:  Carlton Gibson|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  HTTP handling |  Version:  dev
 Severity:  Normal|   Resolution:
 Keywords:  ASGI  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Mariusz Felisiak):

 * cc: Jonas Lundberg (added)
 * 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/0107018118f4bdc9-aa6c8d25-a632-43f6-a92a-23b40cb65a14-00%40eu-central-1.amazonses.com.


Re: [Django] #33191: Avoid unnecessary clear of cached reference

2022-05-31 Thread Django
#33191: Avoid unnecessary clear of cached reference
-+-
 Reporter:  Barry Johnson|Owner:
 Type:   |  AllenJonathan
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  3.2
  (models, ORM)  |
 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 Mariusz Felisiak):

 * owner:  nobody => AllenJonathan
 * status:  new => assigned
 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/15737 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/0107018118f3baee-ee5be057-3c28-41b5-8465-45be86fe8da7-00%40eu-central-1.amazonses.com.


Re: [Django] #33755: Move ASGI body-file cleanup into ASGIRequest (was: Move ASGi body-file cleanup into ASGIRequest)

2022-05-31 Thread Django
#33755: Move ASGI body-file cleanup into ASGIRequest
-+-
 Reporter:  Carlton Gibson   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  HTTP handling|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  ASGI | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018118ef31e1-36b078ab-ed9a-4bfd-ae42-2d418f166c24-00%40eu-central-1.amazonses.com.


Re: [Django] #33755: Move ASGi body-file cleanup into ASGIRequest

2022-05-31 Thread Django
#33755: Move ASGi body-file cleanup into ASGIRequest
-+-
 Reporter:  Carlton Gibson   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  HTTP handling|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  ASGI | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Carlton Gibson:

Old description:

> In `django/core/handlers/asgi.py` `ASGIHandler.handle()` currently
> creates a temporary file, `body_file`, and then maintains responsibility
> for closing that once the response is generated in an extend
> `try...finally`. In outline:
>
> ```
> body_file = ...
>
> try:
> ...
> finally:
> body_file.close()
> ```
>
> The `body_file` is passed into the request, via `create_request()` and
> `ASGIRequest.__init()`. Conceptually the request object takes ownership
> of `body_file` at that point, and ideally it would be responsible for
> cleaning it up too, perhaps via a `__del__` implementation.

New description:

 In `django/core/handlers/asgi.py` `ASGIHandler.handle()` currently creates
 a temporary file, `body_file`, and then maintains responsibility for
 closing that once the response is generated in an extend `try...finally`.
 In outline:




 {{{
 body_file = ...

 try:
 ...
 finally:
 body_file.close()
 }}}

 The `body_file` is passed into the request, via `create_request()` and
 `ASGIRequest.__init()`. Conceptually the request object takes ownership of
 `body_file` at that point, and ideally it would be responsible for
 cleaning it up too, perhaps via a `__del__` implementation.

--

-- 
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/0107018118ee6d52-4383aa13-8d9c-4109-8815-6d3265409ada-00%40eu-central-1.amazonses.com.


[Django] #33755: Move ASGi body-file cleanup into ASGIRequest

2022-05-31 Thread Django
#33755: Move ASGi body-file cleanup into ASGIRequest
+
   Reporter:  Carlton Gibson|  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  HTTP handling |Version:  dev
   Severity:  Normal|   Keywords:  ASGI
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 In `django/core/handlers/asgi.py` `ASGIHandler.handle()` currently creates
 a temporary file, `body_file`, and then maintains responsibility for
 closing that once the response is generated in an extend `try...finally`.
 In outline:

 ```
 body_file = ...

 try:
 ...
 finally:
 body_file.close()
 ```

 The `body_file` is passed into the request, via `create_request()` and
 `ASGIRequest.__init()`. Conceptually the request object takes ownership of
 `body_file` at that point, and ideally it would be responsible for
 cleaning it up too, perhaps via a `__del__` implementation.

-- 
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/0107018118edbb9d-d439ede1-7cfa-4f67-82bd-30e4752369c6-00%40eu-central-1.amazonses.com.


Re: [Django] #33754: Request body is closed prematurely by the ASGI handler

2022-05-31 Thread Django
#33754: Request body is closed prematurely by the ASGI handler
-+-
 Reporter:  Jonas Lundberg   |Owner:  Jonas
 |  Lundberg
 Type:  Bug  |   Status:  assigned
Component:  HTTP handling|  Version:  4.1
 Severity:  Release blocker  |   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/0107018118d794b7-2248c592-2a11-482e-90a6-9c93f8c91d12-00%40eu-central-1.amazonses.com.


Re: [Django] #33754: Request body is closed prematurely by the ASGI handler

2022-05-31 Thread Django
#33754: Request body is closed prematurely by the ASGI handler
-+-
 Reporter:  Jonas Lundberg   |Owner:  Jonas
 |  Lundberg
 Type:  Bug  |   Status:  assigned
Component:  HTTP handling|  Version:  4.1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * type:  Uncategorized => Bug
 * stage:  Unreviewed => Accepted


Comment:

 Thanks!

 Regression in 441103a04d1d167dc870eaaf90e3fba974f67c93.

-- 
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/0107018118bb2962-925d4089-cc4f-40a6-8627-8b9a8ed26209-00%40eu-central-1.amazonses.com.