NiceGUI: Change threshold for binding propagation warning
All notes in this series:
- NiceGUI: Always show main scrollbar
- NiceGUI: Show a confirmation popup
- NiceGUI: File upload and download
- FastAPI: Pretty print JSON
- NiceGUI with Click, Poetry, auto-reload and classes
- NiceGUI: tkinter error when updating pyplot
- NiceGUI: Bind visibility to arbitrary value
- NiceGUI: Change threshold for binding propagation warning
- NiceGUI with async classes
In NiceGUI you may start to see a binding propagation
warning logged repeatedly if you have lots of binding.
For example:
Origin of the warning §
This logging comes from NiceGUI, from these lines in binding.py
:
Changing the warning threshold §
Unfortunately there is no “nice” way to change the value of MAX_PROPAGATION_TIME
, since it is defined at the top of binding.py
as follows:
However, since this is Python where nothing is truly private, you can just monkeypatch NiceGUI: