Version 1.18.0

Highlights

  • :confetti_ball: Introducing @st.cache_data and @st.cache_resource — two new caching commands to replace st.cache! Check out our blog post and documentation for more information.

Notable Changes

  • :nesting_dolls: st.columns supports up to one level of column nesting (i.e., columns inside columns) in the main area of the app.

  • :hourglass_flowing_sand: st.progress supports adding a message to display above the progress bar with the text keyword parameter.

  • ↔️ st.button has an optional use_container_width parameter to allow you to stretch buttons across the full container width.

  • :snake: We formally added support for Python 3.11.

  • :printer: Save your app as a PDF via the “Print” option in your app’s hamburger menu.

  • :bellhop_bell: Apps can serve small, static media files via the enableStaticServing config option. See our documentation on how to use this feature and our demo app for an example.

Other Changes

  • :checkered_flag: All Streamlit endpoints (including /healthz) have been renamed to have a consistent pattern and avoid any clashes with reserved endpoints of GCP (notably Cloud Run and App Engine) (#5534).

  • :zap: Improved caching performance when multiple sessions access an uncomputed cached value simultaneously (#6017).

  • :construction: Streamlit only displays deprecation warnings in the browser when the client.showErrorDetails config option is set to True. Deprecation warnings always get logged to the console, regardless of whether they’re displayed in-browser (#5945).

  • :ping_pong: Refactored the st.dataframe internals to improve dataframe handling and conversion, such as detecting more types, converting key-value dicts to dataframes, and more (#6026, #6023).

  • :minidisc: The behavior of widget labels when they are passed unsupported Markdown elements is documented (#5978).

  • :bar_chart: Bug fix: Plotly improvements — upgraded multiple frontend dependencies, including Plotly, to the latest version to properly redraw cached charts, make Plotly mapbox animations work, and allow users to update the figure layout when using the Streamlit theme (#5885, #5967, #6055).

  • :signal_strength: Bug fix: allow browser tabs that transiently disconnect (due to a network blip, load balancer timeout, etc.) to avoid losing all of their state (#5856).

  • :iphone: Bug fix: the keyboard is hidden on mobile when st.selectbox and st.multiselect have less than 10 options (#5979).

  • :honeybee: Bug fix: design tweaks to st.metric, st.multiselect, st.tabs , and menu items to prevent label overflow and scrolling issues, especially with small viewport sizes (#5933, #6034).

  • :lady_beetle: Bug fix: switched to a functioning Twemoji URL from which page favicons are loaded in st.set_page_config (#5943).

  • :writing_hand: More type hints (#5986). Thanks, harahu!

10 Likes

Thank you once again! :balloon: :balloon: :balloon:

FYI, doing some checks and saw the “help” tooltip for st.metric renders in a super weird position:

import streamlit as st

st.title("'Help' tooltips in st.metric render in a weird position")

st.metric(
    label = "Example metric",
    help = "Something doesn't feel right...",
    value = 150.59,
    delta = "Very high"
    )
4 Likes

:fire: :fire: :fire:

Not thrilled about this being True by default, but hey, the new cache functions are working well! Happy they made it out of experimental.

1 Like

@marduk , that’s definitely a bug. :thinking:
Thanks for pointing it out and being active on our discussion forums and issue forum! Will make an issue and if I have time, I can make a PR.

William

1 Like

I’ve submitted an issue here :+1:

1 Like

Thank you both @willhuang @snehankekre, super appreciated!

I have an app that works fine in 1.17 but just won’t start in 1.18.0
Nothing renders, no hamburger, nothing with showErrorDetails=True
Not really sure how to provide more info about this

Are you using Safari to view the app? There’s a regression that affects apps viewed in Safari and we’ve prioritized it as a P0. There’s a PR out to fix it.

Hi!

I was wondering if visual regression testing is performed on Streamlit releases?

For those who are unfamiliar, visual regression testing is a method of ensuring that changes to the appearance of a software application do not negatively impact the user experience. This is typically achieved by automatically comparing screenshots of the application before and after changes are made, and highlighting any differences.

I found this tutorial for users, however, I have not been able to find any information on whether or not Streamlit uses this method to test their releases.

If any members of the Streamlit team or community have insight on this matter, I would greatly appreciate hearing from you!

Just updated to 1.18 and now when I first start my app gives me an error about set_page_config()

When I reload the page the error does not show again, but it does whenever I restart the app.

When I revert to version 1.17 this error is no longer showing.

Anyone else notice this issue?

streamlit.errors.StreamlitAPIException: set_page_config() can only be called once per app, and must be called as the first Streamlit command in your script.

1 Like

Okay, got it… I was using Safari.

Hi @TomJohn ,

We do have visual screenshot tests. We test using cypress.

1 Like

Hi all, 1.18.1 is released! Please upgrade so that safari can work and embedded apps can work :slight_smile:

5 Likes

Does column nesting also work within a st.expander or with a st.expnder in between the nested columns? Like this:

col A
- expander
-- cols within expander
col B

fantastic. :+1:

This error appear in the new version when the user is caught speed clicking on the app :
Failed to process a Websocket message (Error: Failed to retrieve ForwardMsg (hash=f5740c25440e3b974d64b7174983aab2): Not Found)

You can reproduce it if you change pages back and fourth for 10 sec, the app disconnect.

Thanks for the release notes!

I have an app on the Streamlit Sharing community cloud, and would love to update it to this release. When doing so, it would be great to run it in Python 3.11, rather than Python 3.10.

Do you have an ETA for when Python 3.11 support will come to the Streamlit Sharing community cloud, as a dropdown option in the “Advanced Settings” bit?

Thanks!

We just started working on 3.11 support for Cloud! Guess in the next few weeks.

4 Likes