]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix: collect notifies only if no handler was registered fix-1091 1092/head
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 14 May 2025 15:16:03 +0000 (17:16 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 14 May 2025 15:20:31 +0000 (17:20 +0200)
commit07f3ceb8ce6a4bbe5605b1008f867aee948a0a51
treef23340fd30f631a56704555aa30ebeb811772dfe
parentf69c66a8cc5d9f643298fab57ab2bbf84fca7123
fix: collect notifies only if no handler was registered

If someone is listening to notifications by using an handler, the
notifies backlog would fill without ever being emptied.

This change has the risk of breaking something if someone is relying on
notifies being received both via callback and via generator, but I don't
know how to satisfy it without creating a leak to users who don't use the
generator. Will ask around...

Fix #1091.
psycopg/psycopg/_connection_base.py
tests/test_notify.py
tests/test_notify_async.py