A few days after upgrading to Dash 4.4.0, I was having an intermittent issue due to a race condition caused by use_async turning on silently. It was an easy fix to explicitly set use_async=False, but it was non-obvious at first that this was the issue.
I'm not sure that I'd call this a "bug" since this does seem like it's intended behaviour, but it was confusing that it happened silently, so I'd like to propose some ideas that might help make this more explicit:
- The default value for this could be set to False so that
use_async isn't enabled without a clear signal of user intent. Users could still explicitly provide None if they really want use_async to be determined dynamically based on availability of asgiref.
- Dash constructor could log a warning when it decides to automatically enable async, with a hint to set
use_async=False if this was unintentional/undesired.
- Documentation could be added/updated to explain this functionality, maybe in the docstrings for the
Dash() constructor, the API Reference Page, and/or a "Migrating to Dash 4" page?
Hope this helps!
A few days after upgrading to Dash 4.4.0, I was having an intermittent issue due to a race condition caused by
use_asyncturning on silently. It was an easy fix to explicitly setuse_async=False, but it was non-obvious at first that this was the issue.I'm not sure that I'd call this a "bug" since this does seem like it's intended behaviour, but it was confusing that it happened silently, so I'd like to propose some ideas that might help make this more explicit:
use_asyncisn't enabled without a clear signal of user intent. Users could still explicitly provide None if they really wantuse_asyncto be determined dynamically based on availability ofasgiref.use_async=Falseif this was unintentional/undesired.Dash()constructor, the API Reference Page, and/or a "Migrating to Dash 4" page?Hope this helps!