Skip to content

Streamlit 1.23.0 has an unspecified dependency on typing-extensions >= 4.0 #6774

@edschofield

Description

@edschofield

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

Streamlit 1.23.0, released today, breaks if the typing-extensions package is version 3.10.0.2.

Manually upgrading the typing-extensions package to a version >= 4.0.0 fixes this, as does downgrading to Streamlit 1.22.0.

Suggested fix: specify typing_extensions>=4.0.0 in the requirements file.

Steps To Reproduce

pip install typing_extensions==3.10.0.2
pip install streamlit==1.23.0
streamlit hello

Current Behavior

Running streamlit hello or streamlit run myscript.py raises the following exception with Streamlit 1.23.0 and typing_extensions 3.10.0.2:

  File "/opt/conda/lib/python3.9/site-packages/streamlit/elements/lib/column_types.py", line 20, in <module>
    from typing_extensions import Literal, NotRequired, TypeAlias, TypedDict
ImportError: cannot import name 'NotRequired' from 'typing_extensions' (/opt/conda/lib/python3.9/site-packages/typing_extensions.py)

The full traceback is here.

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.23.0
  • Python version: multiple
  • Operating System: multiple

Are you willing to submit a PR?

  • Yes, I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions