]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix: don't call str(self) or imported objects in __del__
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 30 Apr 2025 00:37:23 +0000 (02:37 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 5 Jul 2025 17:30:27 +0000 (19:30 +0200)
commit6a1a32a2238bb336a0e54a3e6aa3a86bf757436b
treec28bec88f3add9f0b329f256e72aa59c577197f4
parent776697d812e6e997b60642f9019dfb742d73aacc
fix: don't call str(self) or imported objects in __del__

We easily end up trying to access resources already unavailable in the
objects representation. In Python 3.14 this seems to happen aggressively
(or maybe it's just more visible because testing a dev version).
.flake8
psycopg/psycopg/_connection_base.py
psycopg/psycopg/_server_cursor.py
psycopg/psycopg/_server_cursor_async.py
psycopg/psycopg/_server_cursor_base.py
psycopg/psycopg/pq/pq_ctypes.py
tests/test_connection.py
tests/test_connection_async.py
tests/test_cursor_server.py
tests/test_cursor_server_async.py