Skip to content
Open
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
2 changes: 1 addition & 1 deletion .ai/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ Dash core. It plugs in the same way as a built-in:
| `dash.py` | `shared_storage` constructor arg + lazy `app.shared_storage` property |
| `_callback_context.py` | `dash.ctx.shared_storage` accessor |

Requires `msgspec` (in `requirements/install.txt`); `DiskcacheSharedStorage`
Requires `msgspec` (the `shared_storage` extra); `DiskcacheSharedStorage`
needs the `diskcache` extra and `RedisSharedStorage` the `redis` extra.

## Async Callbacks
Expand Down
2 changes: 1 addition & 1 deletion .ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dash/
│ ├── integration/ # Selenium browser tests
│ ├── compliance/ # Type checking (pyright/mypy)
│ └── background_callback/ # Background callback tests
└── requirements/ # Modular dependency files
└── pyproject.toml # Package metadata and dependencies
```

## Code Review Conventions
Expand Down
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ updates:
day: "monday"
cooldown:
default-days: 14
# Keep lower bounds (e.g. Flask>=1.0.4 in install.txt) low: only raise a
# Keep lower bounds (e.g. Flask>=1.0.4 in pyproject.toml) low: only raise a
# floor when the latest release is incompatible with the current range.
# Exact (==) pins in ci/dev/testing still update as normal.
# Exact (==) pins in the ci/dev/testing extras still update as normal.
versioning-strategy: increase-if-necessary
groups:
pip-dependencies:
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ jobs:
id: filter # Give an ID to this step to reference its outputs
uses: dorny/paths-filter@v3
with:
# Every job installs from requirements/ and setup.py and runs under
# Every job installs from pyproject.toml and runs under
# the shared lint and pytest config, so a change there must run every
# job. A dependency bump once skipped the table and dcc jobs and only
# failed after merging to dev.
filters: |
shared_paths: &shared_paths
- 'requirements/**'
- 'setup.py'
- 'pyproject.toml'
- 'MANIFEST.in'
- 'pytest.ini'
- '.flake8'
- '.pylintrc'
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -243,7 +243,7 @@ jobs:
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -309,7 +309,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -389,7 +389,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -495,7 +495,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -557,7 +557,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -617,7 +617,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -681,7 +681,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -743,7 +743,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -819,7 +819,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -921,7 +921,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -1059,7 +1059,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -1129,7 +1129,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -1209,7 +1209,7 @@ jobs:
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: requirements/*.txt
cache-dependency-path: pyproject.toml

- name: Download built Dash packages
uses: actions/download-artifact@v4
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ This project adheres to [Semantic Versioning](https://semver.org/).
### Removed
- [#4136](https://github.com/plotly/dash/pull/4136) Drop Python 3.9 support: Dash now requires Python 3.10 or later, and is tested on 3.10 through 3.14.

### Changed
- [#4159](https://github.com/plotly/dash/pull/4159) Package metadata and dependencies move from `setup.py` and `requirements/*.txt` to `pyproject.toml`. The installed package and its extras are unchanged.

### Fixed
- [#4162](https://github.com/plotly/dash/pull/4162) Fix the FastAPI websocket handler logging an `Exception in ASGI application` traceback when the client disconnects while messages are being sent. Fixes [#4157](https://github.com/plotly/dash/issues/4157).
- [#4160](https://github.com/plotly/dash/pull/4160) Fix R package generation crashing when the R package settings have no `pkg_help_title` or `pkg_help_description`; it now falls back to the `package.json` description.
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include README.md
include LICENSE
include requirements/*.txt
include dash/favicon.ico
include dash/extract-meta.js
include dash/deps/*.js
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"private::build.jupyterlab": "cd @plotly/dash-jupyterlab && jlpm install && jlpm build:pack",
"private::lint.black": "black dash tests --exclude 'metadata_test.py|node_modules' --check",
"private::lint.flake8": "flake8 dash tests",
"private::lint.pylint-dash": "pylint dash setup.py --rcfile=.pylintrc",
"private::lint.pylint-dash": "pylint dash --rcfile=.pylintrc",
"private::lint.pylint-tests": "pylint tests/unit tests/integration -d all -e C0410,C0413,W0109 --rcfile=.pylintrc",
"private::lint.renderer": "cd dash/dash-renderer && npm run lint",
"private::test.setup-components": "cd @plotly/dash-test-components && npm ci && npm run build",
Expand Down
160 changes: 160 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"

[project]
name = "dash"
dynamic = ["version"]
description = "A Python framework for building reactive web-apps. Developed by Plotly."
readme = "README.md"
license = "MIT"
authors = [{ name = "Chris Parmer", email = "chris@plotly.com" }]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Dash",
"Framework :: Flask",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Financial and Insurance Industry",
"Intended Audience :: Healthcare Industry",
"Intended Audience :: Manufacturing",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Database :: Front-Ends",
"Topic :: Office/Business :: Financial :: Spreadsheet",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Widget Sets",
]
dependencies = [
"Flask>=1.0.4,<3.2",
"Werkzeug<3.2",
"plotly>=5.0.0",
"importlib-metadata",
"typing_extensions>=4.1.1",
"requests",
"retrying",
"nest-asyncio",
"setuptools",
"janus>=1.0.0",
"pydantic>=2.10",
"comm",
]

[project.optional-dependencies]
async = ["flask[async]"]
# Dependencies used by CI on github.com/plotly/dash
ci = [
"black==22.3.0",
"flake8==7.3.0",
"flaky==3.8.1",
"flask-talisman==1.1.0",
"httpx", # fastapi.testclient (tests/websocket/test_ws_stream.py)
"ipython<9.0.0",
"mimesis<=22.2.0",
"mock==5.2.0",
"msgspec", # dash[shared_storage]
"numpy<=2.5.4",
"orjson>=3.10.11",
"openpyxl",
"pandas>=1.4.0",
"pyarrow",
"pylint==4.0.9",
"pytest-mock",
"pytest-split",
"pytest-sugar==1.1.1",
"pyzmq>=26.0.0",
"xlrd>=2.0.1",
"pytest-rerunfailures",
"pytest-timeout",
"jupyterlab<4.0.0",
"pyright==1.1.414",
"mypy==1.15.0",
]
# Dependencies used for developing new Dash components
dev = [
"coloredlogs>=15.0.1",
"fire>=0.4.0",
"PyYAML>=5.4.1",
]
# Dependencies necessary for utilizing Dash provided testing utilities
testing = [
"beautifulsoup4>=4.8.2",
"cryptography",
"lxml>=4.6.2",
"percy-python-selenium>=1.0.0",
"pytest>=6.0.2",
"requests[security]>=2.21.0",
"selenium>=4.11.0,<=4.52.0",
"waitress>=1.4.4",
"multiprocess>=0.70.12",
"psutil>=5.8.0",
"dash_testing_stub>=0.0.2",
]
# Used by the CeleryLongCallbackManager
celery = [
"redis>=3.5.3,<=8.1.0",
"kombu<5.7.0",
"celery[redis]>=5.1.2,<5.7.0",
]
# Used by the DiskcacheLongCallbackManager
diskcache = [
"diskcache>=5.2.1",
"multiprocess>=0.70.12",
"psutil>=5.8.0",
"msgspec", # DiskcacheSharedStorage
]
# Used by RedisSharedStorage. Keep the redis pin in sync with celery; in
# Dash 5.0 redis will be removed from the celery extra and live here only.
redis = [
"redis>=3.5.3,<=8.1.0",
"msgspec",
]
compress = ["flask-compress"]
fastapi = [
"fastapi",
"uvicorn[standard]",
]
quart = ["quart"]
cloud = ["plotly-cloud"]
ag-grid = ["dash-ag-grid"]
shared_storage = ["msgspec"]

[project.urls]
Homepage = "https://plotly.com/dash"
Documentation = "https://dash.plotly.com"
Source = "https://github.com/plotly/dash"
"Issue Tracker" = "https://github.com/plotly/dash/issues"

[project.scripts]
dash-generate-components = "dash.development.component_generator:cli"
renderer = "dash.development.build_process:renderer"
dash-update-components = "dash.development.update_components:cli"
plotly = "dash._plotly_cli:cli"

[project.entry-points.pytest11]
dash = "dash.testing.plugin"

[tool.setuptools.dynamic]
version = { attr = "dash.version.__version__" }

# Only dash: a stray top-level package (for example the benchmarks harness)
# would shadow a directory of the same name in every project that installs dash.
[tool.setuptools.packages.find]
include = ["dash", "dash.*"]
namespaces = false

# Like `jupyter nbextension install/enable --sys-prefix` and the jupyterlab
# extension directory.
[tool.setuptools.data-files]
"share/jupyter/nbextensions/dash" = ["dash/nbextension/main.js"]
"etc/jupyter/nbconfig/notebook.d" = ["dash/nbextension/dash.json"]
"share/jupyter/lab/extensions" = ["dash/labextension/dist/dash-jupyterlab.tgz"]
1 change: 0 additions & 1 deletion requirements/ag-grid.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements/async.txt

This file was deleted.

4 changes: 0 additions & 4 deletions requirements/celery.txt

This file was deleted.

26 changes: 0 additions & 26 deletions requirements/ci.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements/cloud.txt

This file was deleted.

Loading
Loading