Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- [#3646](https://github.com/plotly/dash/pull/3646) Remove React 16 support (`16.14.0` is no longer an accepted value for `REACT_VERSION` / `_set_react_version`).

### Changed
- [#4073](https://github.com/plotly/dash/pull/4073) Move `plotly-cloud` back to the optional `dash[cloud]` extra (it was a default dependency in 4.5.0rc0/rc1), since it is not available on conda-forge.
- [#4026](https://github.com/plotly/dash/pull/4026) Log a warning, once per process, when a streaming request is refused because its stream token failed verification, which on multi-worker deployments usually means the workers do not share a signing secret.
- [#3987](https://github.com/plotly/dash/pull/3987) Forward FastAPI reload scope options (`reload_dirs`, `reload_excludes`, and `reload_includes`) to Uvicorn when reloading.
- [#3986](https://github.com/plotly/dash/pull/3986) Adjust `_run_before_hooks` in the `fastapi` backend to honor a response returned by a `before_request` function, matching the `flask` backend's behavior.
Expand Down
3 changes: 1 addition & 2 deletions dash/_plotly_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ def cli():
except ImportError:
print(
"Plotly cloud is not installed,"
" install it with `pip install plotly-cloud` (or reinstall dash)"
" to use the plotly command",
" install it with `pip install dash[cloud]` to use the plotly command",
file=sys.stderr,
)
sys.exit(-1)
1 change: 0 additions & 1 deletion requirements/install.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Flask>=1.0.4,<3.2
Werkzeug<3.2
plotly>=5.0.0
plotly-cloud
importlib-metadata
typing_extensions>=4.1.1
requests
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/devtools/test_callback_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ 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-*`
# plotly-cloud (installed with dash[cloud]) 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.
Expand Down
24 changes: 24 additions & 0 deletions tests/unit/test_plotly_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import sys
from pathlib import Path

import pytest

from dash._plotly_cli import cli


def test_plotly_cli_hints_cloud_extra_when_missing(monkeypatch, capsys):
# A None entry in sys.modules makes the import raise ImportError.
monkeypatch.setitem(sys.modules, "plotly_cloud", None)
monkeypatch.setitem(sys.modules, "plotly_cloud.cli", None)

with pytest.raises(SystemExit) as exc:
cli()

assert exc.value.code == -1
assert "pip install dash[cloud]" in capsys.readouterr().err


def test_plotly_cloud_is_not_an_install_requirement():
install = Path(__file__).parents[2] / "requirements" / "install.txt"
required = install.read_text(encoding="utf-8").lower().split()
assert "plotly-cloud" not in required
Loading