@@ -802,6 +802,7 @@ def _config(self):
802
802
"requests_pathname_prefix" : self .config .requests_pathname_prefix ,
803
803
"ui" : self ._dev_tools .ui ,
804
804
"props_check" : self ._dev_tools .props_check ,
805
+ "silence_upgrade_notification" : self ._dev_tools .silence_upgrade_notification ,
805
806
"show_undo_redo" : self .config .show_undo_redo ,
806
807
"suppress_callback_exceptions" : self .config .suppress_callback_exceptions ,
807
808
"update_title" : self .config .update_title ,
@@ -1754,6 +1755,12 @@ def _setup_dev_tools(self, **kwargs):
1754
1755
get_combined_config (attr , kwargs .get (attr , None ), default = default )
1755
1756
)
1756
1757
1758
+ dev_tools ["silence_upgrade_notification" ] = get_combined_config (
1759
+ "silence_upgrade_notification" ,
1760
+ kwargs .get ("silence_upgrade_notification" , None ),
1761
+ default = False ,
1762
+ )
1763
+
1757
1764
return dev_tools
1758
1765
1759
1766
def enable_dev_tools (
@@ -1767,6 +1774,7 @@ def enable_dev_tools(
1767
1774
dev_tools_hot_reload_watch_interval = None ,
1768
1775
dev_tools_hot_reload_max_retry = None ,
1769
1776
dev_tools_silence_routes_logging = None ,
1777
+ dev_tools_silence_upgrade_notification = None ,
1770
1778
dev_tools_prune_errors = None ,
1771
1779
):
1772
1780
"""Activate the dev tools, called by `run`. If your application
@@ -1787,6 +1795,7 @@ def enable_dev_tools(
1787
1795
- DASH_HOT_RELOAD_WATCH_INTERVAL
1788
1796
- DASH_HOT_RELOAD_MAX_RETRY
1789
1797
- DASH_SILENCE_ROUTES_LOGGING
1798
+ - DASH_SILENCE_UPGRADE_NOTIFICATION
1790
1799
- DASH_PRUNE_ERRORS
1791
1800
1792
1801
:param debug: Enable/disable all the dev tools unless overridden by the
@@ -1832,6 +1841,11 @@ def enable_dev_tools(
1832
1841
env: ``DASH_SILENCE_ROUTES_LOGGING``
1833
1842
:type dev_tools_silence_routes_logging: bool
1834
1843
1844
+ :param dev_tools_silence_upgrade_notification: Silence the upgrade
1845
+ notification to prevent making requests to the Dash server.
1846
+ env: ``DASH_SILENCE_UPGRADE_NOTIFICATION``
1847
+ :type dev_tools_silence_upgrade_notification: bool
1848
+
1835
1849
:param dev_tools_prune_errors: Reduce tracebacks to just user code,
1836
1850
stripping out Flask and Dash pieces. Only available with debugging.
1837
1851
`True` by default, set to `False` to see the complete traceback.
@@ -1853,6 +1867,7 @@ def enable_dev_tools(
1853
1867
hot_reload_watch_interval = dev_tools_hot_reload_watch_interval ,
1854
1868
hot_reload_max_retry = dev_tools_hot_reload_max_retry ,
1855
1869
silence_routes_logging = dev_tools_silence_routes_logging ,
1870
+ silence_upgrade_notification = dev_tools_silence_upgrade_notification ,
1856
1871
prune_errors = dev_tools_prune_errors ,
1857
1872
)
1858
1873
@@ -2052,6 +2067,7 @@ def run(
2052
2067
dev_tools_hot_reload_watch_interval : Optional [int ] = None ,
2053
2068
dev_tools_hot_reload_max_retry : Optional [int ] = None ,
2054
2069
dev_tools_silence_routes_logging : Optional [bool ] = None ,
2070
+ dev_tools_silence_upgrade_notification : Optional [bool ] = None ,
2055
2071
dev_tools_prune_errors : Optional [bool ] = None ,
2056
2072
** flask_run_options ,
2057
2073
):
@@ -2124,6 +2140,11 @@ def run(
2124
2140
env: ``DASH_SILENCE_ROUTES_LOGGING``
2125
2141
:type dev_tools_silence_routes_logging: bool
2126
2142
2143
+ :param dev_tools_silence_upgrade_notification: Silence the upgrade
2144
+ notification to prevent making requests to the Dash server.
2145
+ env: ``DASH_SILENCE_UPGRADE_NOTIFICATION``
2146
+ :type dev_tools_silence_upgrade_notification: bool
2147
+
2127
2148
:param dev_tools_prune_errors: Reduce tracebacks to just user code,
2128
2149
stripping out Flask and Dash pieces. Only available with debugging.
2129
2150
`True` by default, set to `False` to see the complete traceback.
@@ -2161,6 +2182,7 @@ def run(
2161
2182
dev_tools_hot_reload_watch_interval ,
2162
2183
dev_tools_hot_reload_max_retry ,
2163
2184
dev_tools_silence_routes_logging ,
2185
+ dev_tools_silence_upgrade_notification ,
2164
2186
dev_tools_prune_errors ,
2165
2187
)
2166
2188
0 commit comments