Hide cache deprecation warning

I am on 1.19.0 but because we cannot use hash_funcs anymore, I would like to keep using the deprecated cache for now. Streamlit shows a very prominent deprecation warning in the app. How can I hide it? I have tried googling and looking on the forums here but haven’t found a solution.

Hey @BramVanroy, unfortunately, there isn’t a way to do this. I’ll share your post about hash_funcs internally and see if anyone has ideas for a way to implement this with the newer caching methods.

Thanks Caroline. Hm that’s unfortunate though because what is the point of deprecation if we cannot effectively use it in practice anymore (because there’s a massive deprecation warning on users’ screen). It might be better in the future for all deprecated feature to have the option to not show the deprecation notice.

1 Like

Hello @BramVanroy,

did you try this? (just disabling all warnings)

import warnings

Yes. But that does not seem to work for streamlit warnings in the interface.

Hi @BramVanroy @Caroline @PaleAlex :wave:

We actually released a feature (config option) in v1.18.0 that allows you to hide the deprecation warning from the client. :smile:

The config option client.showErrorDetails is set to true by default. To disable it:

  1. Either run your app (say app.py) with the following command-line flag:

    streamlit run app.py --client.showErrorDetails=false
  2. Or set it to false via a .streamlit/config file:

    showErrorDetails = false



Oh awesome!! :heart_eyes: