1
0
mirror of https://github.com/django/django.git synced 2025-04-17 05:44:38 +00:00
Anders Kaseorg c91e92fbfc Fixed #30448, Fixed #35618 -- Do not close connection in atomic block.
Previously, the `django.db.close_old_connections` handler for
`request_started` and `request_finished` would incorrectly close any
connection within a `transaction.atomic` block (such as the one
automatically used by `django.db.TestCase`), leading to
`InterfaceError: connection already closed`.

The test client and many of our tests have been working around this
bug by manually suppressing the `close_old_connections` handler, but
the workarounds are incomplete and the bug still affects other
projects.  Fix the bug and remove the workarounds.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2024-07-19 13:39:18 -07:00
..
2024-01-26 12:45:07 +01:00