Remove deprecation warning for Cache

I tried a few tricks proposed on the forum, but I am not able to remove the st.cache deprecation warning.
I tried the config.toml, running the script with --client.showErrorDetails=false and even the warnings.filterwarnings(“ignore”) code but no cigar.
Any idea?

Replace cache with cache_data or cache_resource.

hey! thanks for the reply.
The problem is that I have none in my code, it must be in some dependencies

Can you share the traceback? The offending dependency must be mentioned there.

this is what I got

`st.cache` is deprecated and will be removed soon. Please use one of Streamlit's new
caching commands, `st.cache_data` or `st.cache_resource`. More information
[in our docs](https://docs.streamlit.io/develop/concepts/architecture/caching).

**Note**: The behavior of `st.cache` was updated in Streamlit 1.36 to the new caching
logic used by `st.cache_data` and `st.cache_resource`. This might lead to some problems
or unexpected behavior in certain edge cases.

None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.

ah, that’s not useful.
Could you share the GH link to your app?

It’s a private repo but I can show you the requirement.txt file, does it help?

streamlit
streamlit-authenticator
psycopg2-binary
bcrypt
st-supabase-connection
pinecone
pdfplumber
transformers
langchain
python-dotenv
langchain_google_genai
openai
langchain-community
langchain-google-genai
streamlit-cookies-manager
pypdf
streamlit-extras
streamlit-cookies-controller
extra_streamlit_components
google-generativeai

Looks like streamlit-cookies-manager is the culprit: streamlit-cookies-manager/streamlit_cookies_manager/encrypted_cookie_manager.py at 7cae792a0ca089430f9cbe66d50bcca3c0b09a8e · ktosiek/streamlit-cookies-manager · GitHub

Also noticed that you are using st-supabase-connection.

I am the maintainer, and would love to have any feedback :hugs:

1 Like

well done in spotting it!
I am using it to persist cookies to avoid the session to be lost after refresh.
Do you have a different suggestion on cookie management?

Not really… I haven’t dabbled with cookie management.
Can you not monkeypatch it? Or fork the repo?