diff --git a/CHANGELOG.md b/CHANGELOG.md index c0bb966c61..c26ffcade3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] ### Added +- [#3947](https://github.com/plotly/dash/pull/3947) Make `plotly-cloud` a default install dependency of Dash instead of an optional extra, so the `plotly` CLI and Dash's cloud integration are available out of the box. The `dash[cloud]` extra is kept for backward compatibility. - [#3930](https://github.com/plotly/dash/pull/3930) Shared storage: a backend-agnostic state manager available on every app via `dash.ctx.shared_storage` (and `app.shared_storage`), for sharing state between callbacks or across worker processes without an external service. Started lazily on first use, so it costs nothing until touched; pass `shared_storage=None` to `Dash(...)` to disable. - Cross-process key/value store (`get`/`set`/`delete`, with optional TTL) and ordered, replayable publish/subscribe (`publish`/`subscribe`). Subscriptions resume from the caller's last-seen sequence out of a bounded buffer, and a buffer overrun surfaces as an explicit gap rather than a silent loss. Values must be JSON-compatible (like `dcc.Store`). - Three backends ship, selected by passing a `BaseSharedStorage` instance to `shared_storage=`: diff --git a/dash/_plotly_cli.py b/dash/_plotly_cli.py index 9974cd23b9..4456962746 100644 --- a/dash/_plotly_cli.py +++ b/dash/_plotly_cli.py @@ -9,7 +9,8 @@ def cli(): except ImportError: print( "Plotly cloud is not installed," - " install it with `pip install dash[cloud]` to use the plotly command", + " install it with `pip install plotly-cloud` (or reinstall dash)" + " to use the plotly command", file=sys.stderr, ) sys.exit(-1) diff --git a/requirements/install.txt b/requirements/install.txt index 795f0c85c8..71e0dafb32 100644 --- a/requirements/install.txt +++ b/requirements/install.txt @@ -1,6 +1,7 @@ Flask>=1.0.4,<3.2 Werkzeug<3.2 plotly>=5.0.0 +plotly-cloud importlib-metadata typing_extensions>=4.1.1 requests diff --git a/tests/integration/devtools/test_callback_validation.py b/tests/integration/devtools/test_callback_validation.py index bde59f3327..e4f89432d5 100644 --- a/tests/integration/devtools/test_callback_validation.py +++ b/tests/integration/devtools/test_callback_validation.py @@ -1,3 +1,5 @@ +import re + import flask import pytest from flaky import flaky @@ -31,6 +33,14 @@ def check_errors(dash_duo, specs): found = [] for i in range(cnt): msg = dash_duo.find_elements(".dash-fe-error__title")[i].text + # plotly-cloud (a default install dep) injects a `_plotly-cloud-*` + # component into every layout via a dash_hooks entry point, so it + # shows up in the "string ids in the current layout" list. Strip it + # so these assertions hold whether or not plotly-cloud is installed. + msg = re.sub(r"_plotly-cloud[\w-]*", "", msg) + msg = re.sub(r",\s*,", ",", msg) + msg = re.sub(r",\s*\]", "]", msg) + msg = re.sub(r"\[\s*,\s*", "[", msg) dash_duo.find_elements(".test-devtools-error-toggle")[i].click() dash_duo.wait_for_element(".dash-backend-error,.dash-fe-error__info") has_BE = dash_duo.driver.execute_script(