#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):

 This in body, since read can be used passing a chunk size ...

 Carlton, this is exactly my findings and thoughts as well :-D ... though
 I'm leaning towards adding a noop {{{LimitedStream.close()}}} instead of
 the {{{try...except}}} block.

     Then, adding a simple close() to ASGIRequest...

 Agree, this is probably enough instead of {{{__del__}}}, i.e. untouched
 {{{request.body}}} will be closed and cleaned up by the response resource
 closers.

 I will open a PR shortly.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018126314201-a8de3e78-efc1-438b-93fb-52c92a9e342b-000000%40eu-central-1.amazonses.com.

Reply via email to