Version 0.64.0
Highlights:
-
Default matplotlib to display charts with a tight layout. To disable this,
setbbox_inches
toNone
, inches as a string, or aBbox
. -
Allow fullscreen content for Streamlit Components.
-
Deprecation warning for automatic decoding on
st.file_uploader
. -
If
gatherUserStats
isFalse
, do not even load the Segment library.
Thanks @tanmaylaud!
Deprecation Warning: FileUploader will no longer decode files automatically beginning after August 15th.
After the initial release of the file uploader, we’ve had great feedback from the community and are undergoing a redesign. Because there is no reliable way for us to decode files with 100% accuracy, we’ve decided to separate any decoding from the file uploader API. This means that all files will be returned as a binary buffer beginning August 15th.
What can I do?
After August 15th, 2020, your application may break depending on the type of file processing being performed. We recommend taking action now to prevent any errors once the redesigned file uploader comes out.
If you are expecting a text buffer, we recommend wrapping your returned buffer in a TextIOWrapper
. This will work today, and will continue to work once the file uploader API changes. To learn more about TextIOWrapper
check out the python documentation.
Current:
import io
import streamlit as st
maybe_string_io = st.file_uploader(...)
# Today, maybe_string_io is either a StringIO or a BytesIO
# depending on the uploaded file.
Recommendation:
import io
import streamlit as st
uploaded_file = st.file_uploader(...)
text_io = io.TextIOWrapper(uploaded_file)
If you are expecting uploading binary files, no action is necessary.
What if I don’t do anything?
As part of this release, st.file_uploader
will now display a deprecation warning if you provide an encoding or relying on our default auto
encoding. This warning can be disabled with the deprecation.showfileUploaderEncoding
config option.
st.set_option('deprecation.showfileUploaderEncoding', False)
or in your .streamlit/config.toml
[deprecation]
showfileUploaderEncoding = False