Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lukasmasuch
Copy link
Collaborator

@lukasmasuch lukasmasuch commented Feb 3, 2025

Describe your changes

We have a Python dependency in Streamlit - rich - that is almost exclusively used in Community Cloud to get nicer formatting for exceptions in the log viewer. However, it is currently installed for all Streamlit installs, which is suboptimal. The dependency is already implemented in Streamlit in a way that it is optional (only used if installed). We have recently changed that rich gets auto-installed on Community Cloud, therefore, we can remove it from Streamlit's required dependencies.

In a follow-up after the release, we also plan to deprecate and eventually remove the logger.enableRich config option and always use rich if installed.

Testing Plan

  • No logical changes. Rich is already an optional dependency in the code logic.

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@lukasmasuch lukasmasuch requested a review from a team as a code owner February 3, 2025 13:16
@lukasmasuch lukasmasuch added security-assessment-completed Security assessment has been completed for PR change:other PR contains other type of change change:refactor PR contains code refactoring without behavior change impact:internal PR changes only affect internal code and removed change:other PR contains other type of change labels Feb 3, 2025
@lukasmasuch lukasmasuch added impact:users PR changes affect end users and removed impact:internal PR changes only affect internal code labels Feb 3, 2025
@lukasmasuch lukasmasuch merged commit 0939cb7 into develop Feb 4, 2025
54 of 63 checks passed
@lukasmasuch lukasmasuch deleted the refactor/remove-rich-from-required-dependencies branch February 4, 2025 14:33
lukasmasuch added a commit that referenced this pull request Mar 5, 2025
## Describe your changes

We recently removed rich as a required dependency in
#10320. This PR automatically
enable better exception logging if `rich` is installed in the local
environment, instead of also requiring the config option to be
configured. This is mainly targeted for community cloud to simplify
their configuration, but might also be useful for some users.

## Testing Plan

- Updated tests to validate that `rich` is activated if `rich` is
installed (which is the case in our testing environment)

---

**Contribution License Agreement**

By submitting this pull request you agree that all contributions to this
project are made under the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:refactor PR contains code refactoring without behavior change impact:users PR changes affect end users security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants