[issue46896] add support for watching writes to selected dictionaries

Brandt Bucher report at bugs.python.org
Thu Mar 3 15:15:00 EST 2022


Brandt Bucher <brandtbucher at gmail.com> added the comment:

> CPython will track only one global callback; it is a well-behaved client’s responsibility to check if a callback is already set when setting a new one, and daisy-chain to the previous callback if so.

Hm, this is a bit scary. Could we (or others) end up with unguarded stale caches if some buggy extension forgets to chain the calls correctly?

Core CPython seems most at risk of this, since we would most likely be registered first.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46896>
_______________________________________


More information about the Python-bugs-list mailing list