Hi,
I’m building an app on Streamlit 1.45 that uses the builtin authentication via OIDC with Auth0 as provider.
Overall login experience works fine but sometimes I get the yellow warning messages saying:
Please replace st.experimental_user with st.user. st.experimental_user will be removed after 2025-11-06.
I’ve checked that my application code does not use the deprecated field but I suspect some of the modules in the requirements that are used under the hood still use the old experimental implementation. My requirements are the following:
st-annotated-text==4.0.2
streamlit==1.45.0
streamlit-card==1.0.2
streamlit-embedcode==0.1.2
streamlit-extras==0.6.0
streamlit-faker==0.0.3
streamlit-highcharts==0.2.0
streamlit-image-coordinates==0.1.9
streamlit-keyup==0.3.0
streamlit-toggle-switch==1.0.2
streamlit-vertical-slider==2.5.5
Is there a way to find out where the warning is generated?
Test each package separately. The older packages are the main suspects.
You may find a better way if you narrow down “sometimes I get the yellow warning messages” to a specific user action performed in specific circunstances, a.k.a a reproducible issue.
Unfortunately, providing a reproducible issue is not easy. The issue often seems to occur when I’m using a breakpoint to stop the execution of the application in debugging sessions. I’ll try to build a minimal example, but as I can not identify any piece of my code responsible for the issue, I don’t have a way to isolate it.
I’ve tried a bit of digging, but don’t see anything obvious in any of those libraries that seems to be using st.experimental_user. One approach you might take is unpinning the specific versions and trying to upgrade all the packages to the latest versions, and see if that resolves the warning.
I also have this warning - I was using version 1.45.1 of streamlit and rolled back to 1.44.1 and now don’t get the warning.. not that it’s any reassurance as the warning may have just been introduced.. None of my code contains the st.experimental_user call..
But, the warning with pygwalker and Streamlit integration is due to following code in pygwalker:
The method hooks into the tornado Application instance with the help of Python garbage collector and adds the necessary handlers to the tornado Application instance for pygwalker.
def raise_exception_instead_of_warning(*args, **kwargs):
"""This function will replace the original Streamlit function."""
raise Exception("MONKEY-PATCH: CULPRIT FOUND! Check the traceback above.")
streamlit.user_info.maybe_show_deprecated_user_warning = raise_exception_instead_of_warning
It leads me to gc.get_objects(). It “catches” every element (the st.experimetal_user element as well) which exists in the streamlit structure, so I guess when the st.experimetal_user will be removed it would not rise any exception.
If I’m wrong I would be glad if anybody correct me
def no_op(*args, **kwargs):
"""This function replaces the original one and does not perform any action."""
pass
streamlit.user_info.maybe_show_deprecated_user_warning = no_op