#35618: response.close() in a TestCase prematurely closes PostgreSQL connection 
and
leads to psycopg2.InterfaceError
-------------------------------------+-------------------------------------
     Reporter:  Anders Kaseorg       |                    Owner:  (none)
         Type:  Uncategorized        |                   Status:  new
    Component:  Database layer       |                  Version:  5.0
  (models, ORM)                      |
     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:  0
-------------------------------------+-------------------------------------
Comment (by Anders Kaseorg):

 The streaming case is the one that motivated me to call `response.close`
 in the first place. Currently there’s no way to get
 `closing_iterator_wrapper` to close the response itself without first
 consuming the entire stream, and leaving it unclosed results in various
 `ResourceWarning`s when warnings are enabled.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35618#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070190c7fe38e0-e45b79f1-3080-481a-ae42-46645149c2f3-000000%40eu-central-1.amazonses.com.

Reply via email to