Skip to content

Conversation

tconkling
Copy link
Contributor

With the incoming @st.cache deprecation, we're going to see a lot of apps with a lot of deprecation warnings. Currently, we show deprecation warnings in the browser, which is convenient for an app's developer - but sucks for app viewers.

With this PR, we will now only print deprecation warnings to the browser when "client.showErrorDetails"=True. This config option is currently used to suppress app exception tracebacks from being printed to the browser, so this is a slight overloading of its original purpose - but it feels appropriate (the circumstance where you don't want to loudly display exception tracebacks - when you have a deployed app - is exactly the same as when you don't want to display deprecation warnings).

Deprecation warnings now also always get logged to the console, so developers will see them in their logs regardless of whether they're displayed in-browser.

@kajarenc
Copy link
Collaborator

LGTM!

If I understand correctly (please correct me if I am wrong), we override client.showErrorDetails in the cloud and set it to False if it is not set in a developer's config.toml` file.

If this is correct I believe we will have desired behavior in most of the cloud apps, except for applications in which the config.toml is copied from the output of the streamlit config show.

@tconkling
Copy link
Contributor Author

If I understand correctly (please correct me if I am wrong), we override client.showErrorDetails in the cloud and set it to False if it is not set in a developer's config.toml` file.

Yeah exactly!

@tconkling tconkling merged commit f070371 into streamlit:develop Jan 12, 2023
@tconkling tconkling deleted the tim/DeprecationWarningsInTerminal branch January 12, 2023 17:35
tconkling added a commit that referenced this pull request Jan 12, 2023
* develop:
  "client.showErrorDetails" controls whether deprecation warnings appear in-browser (#5945)
  Update Minor dependencies (and some majors/patches) - Part B (#5921)
eric-skydio pushed a commit to eric-skydio/streamlit that referenced this pull request Dec 20, 2023
…r in-browser (streamlit#5945)

With the incoming `@st.cache` deprecation, we're going to see a lot of apps with a lot of deprecation warnings. Currently, we show deprecation warnings in the browser, which is convenient for an app's developer - but sucks for app viewers.

With this PR, we will now only print deprecation warnings to the browser when `"client.showErrorDetails"=True`. This config option is currently used to suppress app exception tracebacks from being printed to the browser, so this is a slight overloading of its original purpose - but it feels appropriate (the circumstance where you don't want to loudly display exception tracebacks - when you have a deployed app - is exactly the same as when you don't want to display deprecation warnings).

Deprecation warnings now also always get logged to the console, so developers will see them in their logs regardless of whether they're displayed in-browser.
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Mar 22, 2024
…r in-browser (streamlit#5945)

With the incoming `@st.cache` deprecation, we're going to see a lot of apps with a lot of deprecation warnings. Currently, we show deprecation warnings in the browser, which is convenient for an app's developer - but sucks for app viewers.

With this PR, we will now only print deprecation warnings to the browser when `"client.showErrorDetails"=True`. This config option is currently used to suppress app exception tracebacks from being printed to the browser, so this is a slight overloading of its original purpose - but it feels appropriate (the circumstance where you don't want to loudly display exception tracebacks - when you have a deployed app - is exactly the same as when you don't want to display deprecation warnings).

Deprecation warnings now also always get logged to the console, so developers will see them in their logs regardless of whether they're displayed in-browser.
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Apr 16, 2024
…r in-browser (streamlit#5945)

With the incoming `@st.cache` deprecation, we're going to see a lot of apps with a lot of deprecation warnings. Currently, we show deprecation warnings in the browser, which is convenient for an app's developer - but sucks for app viewers.

With this PR, we will now only print deprecation warnings to the browser when `"client.showErrorDetails"=True`. This config option is currently used to suppress app exception tracebacks from being printed to the browser, so this is a slight overloading of its original purpose - but it feels appropriate (the circumstance where you don't want to loudly display exception tracebacks - when you have a deployed app - is exactly the same as when you don't want to display deprecation warnings).

Deprecation warnings now also always get logged to the console, so developers will see them in their logs regardless of whether they're displayed in-browser.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants