]> 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:29:08 +0000 (19:29 +0200)
commit074d94eaf640df4649826137199be1274f42bd75
treed3e2c69fd5b8947fa0ed82314cc6e8edfc037df4
parentb939ee7c87fd9a7810db8597039a26ad7dab4d2c
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