From 558ab0c60d83417f974c8c1e355a1906cf5497ee Mon Sep 17 00:00:00 2001 From: philippe Date: Tue, 17 Jun 2025 14:21:45 -0400 Subject: [PATCH 1/3] update flask --- requirements/install.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/install.txt b/requirements/install.txt index 65fccc279d..df0e1299e3 100644 --- a/requirements/install.txt +++ b/requirements/install.txt @@ -1,5 +1,5 @@ -Flask>=1.0.4,<3.1 -Werkzeug<3.1 +Flask>=1.0.4,<3.2 +Werkzeug<3.2 plotly>=5.0.0 importlib-metadata typing_extensions>=4.1.1 From a76d7156f4e10ff26cb3b3f8fbf8d835be8ee04c Mon Sep 17 00:00:00 2001 From: philippe Date: Tue, 17 Jun 2025 15:18:48 -0400 Subject: [PATCH 2/3] remove werkzeug version check from tests --- .lintstagedrc.js | 12 ++++++++++-- .../integration/calendar/test_date_picker_single.py | 6 ------ .../tests/integration/graph/test_graph_varia.py | 9 --------- .../tests/integration/store/test_data_lifecycle.py | 6 ------ .../tests/integration/tab/test_tabs_with_graphs.py | 7 ------- tests/integration/callbacks/test_basic_callback.py | 6 ------ 6 files changed, 10 insertions(+), 36 deletions(-) diff --git a/.lintstagedrc.js b/.lintstagedrc.js index fd701b086a..2f636a5a8d 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -26,10 +26,18 @@ const sh_cd = (directory, command) => { module.exports = { // Python checks (run from root, using root venv) - "*.py": (filenames) => [ + "dash/*.py": (filenames) => [ `${venvBin("python")} -m pylint --rcfile=.pylintrc ${filenames.join( " " - )}`, // Add your pylintrc if you have one + )}`, + `${venvBin("flake8")} ${filenames.join(" ")}`, + `${venvBin("black")} --check ${filenames.join(" ")}`, + ], + + "tests/**/*.py": (filenames) => [ + `${venvBin("python")} -m pylint -d all -e C0410,C0413,W0109 --rcfile=.pylintrc ${filenames.join( + " " + )}`, `${venvBin("flake8")} ${filenames.join(" ")}`, `${venvBin("black")} --check ${filenames.join(" ")}`, ], diff --git a/components/dash-core-components/tests/integration/calendar/test_date_picker_single.py b/components/dash-core-components/tests/integration/calendar/test_date_picker_single.py index f1e38a05b8..d13194511f 100644 --- a/components/dash-core-components/tests/integration/calendar/test_date_picker_single.py +++ b/components/dash-core-components/tests/integration/calendar/test_date_picker_single.py @@ -3,7 +3,6 @@ import time import pytest -import werkzeug from dash import Dash, Input, Output, html, dcc, no_update @@ -75,11 +74,6 @@ def test_dtps010_local_and_session_persistence(dash_dcc): assert dash_dcc.get_logs() == [] -@pytest.mark.xfail( - condition=werkzeug.__version__ in ("2.1.0", "2.1.1"), - reason="Bug with 204 and Transfer-Encoding", - strict=False, -) def test_dtps011_memory_persistence(dash_dcc): app = Dash(__name__) app.layout = html.Div( diff --git a/components/dash-core-components/tests/integration/graph/test_graph_varia.py b/components/dash-core-components/tests/integration/graph/test_graph_varia.py index 582c211aa7..92481ee811 100644 --- a/components/dash-core-components/tests/integration/graph/test_graph_varia.py +++ b/components/dash-core-components/tests/integration/graph/test_graph_varia.py @@ -3,7 +3,6 @@ import time import json -import werkzeug from selenium.webdriver import ActionChains from dash import Dash, Input, Output, State, dcc, html @@ -229,10 +228,6 @@ def assert_graph_equals(browser, graph_id, graph_data): assert y == expected_y -@pytest.mark.skipif( - werkzeug.__version__ in ("2.1.0", "2.1.1"), - reason="Bug with no_update 204 responses get Transfer-Encoding header.", -) @pytest.mark.parametrize("is_eager", [True, False]) def test_grva004_graph_prepend_trace(dash_dcc, is_eager): app = Dash(__name__, eager_loading=is_eager) @@ -380,10 +375,6 @@ def trace_will_prepend_with_max_points(n_intervals): assert dash_dcc.get_logs() == [] -@pytest.mark.skipif( - werkzeug.__version__ in ("2.1.0", "2.1.1"), - reason="Bug with no_update 204 responses get Transfer-Encoding header.", -) @pytest.mark.parametrize("is_eager", [True, False]) def test_grva005_graph_extend_trace(dash_dcc, is_eager): app = Dash(__name__, eager_loading=is_eager) diff --git a/components/dash-core-components/tests/integration/store/test_data_lifecycle.py b/components/dash-core-components/tests/integration/store/test_data_lifecycle.py index cec4a9857a..a5ca23984d 100644 --- a/components/dash-core-components/tests/integration/store/test_data_lifecycle.py +++ b/components/dash-core-components/tests/integration/store/test_data_lifecycle.py @@ -1,14 +1,8 @@ import pytest -import werkzeug import dash.testing.wait as wait -@pytest.mark.xfail( - condition=werkzeug.__version__ in ("2.1.0", "2.1.1"), - reason="Bug with 204 and Transfer-Encoding", - strict=False, -) def test_stdl001_data_lifecycle_with_different_condition(store_app, dash_dcc): dash_dcc.start_server(store_app) diff --git a/components/dash-core-components/tests/integration/tab/test_tabs_with_graphs.py b/components/dash-core-components/tests/integration/tab/test_tabs_with_graphs.py index 3be3ae0992..48b085850d 100644 --- a/components/dash-core-components/tests/integration/tab/test_tabs_with_graphs.py +++ b/components/dash-core-components/tests/integration/tab/test_tabs_with_graphs.py @@ -1,5 +1,3 @@ -import werkzeug - from dash import Dash, Input, Output, dcc, html from dash.exceptions import PreventUpdate import json @@ -117,11 +115,6 @@ def render_content(tab): assert dash_dcc.get_logs() == [] -@pytest.mark.xfail( - condition=werkzeug.__version__ in ("2.1.0", "2.1.1"), - reason="Bug with 204 and Transfer-Encoding", - strict=False, -) @pytest.mark.parametrize("is_eager", [True, False]) def test_tagr002_tabs_render_without_selected(dash_dcc, is_eager): app = Dash(__name__, eager_loading=is_eager) diff --git a/tests/integration/callbacks/test_basic_callback.py b/tests/integration/callbacks/test_basic_callback.py index d22e1c3e00..72af7d3cac 100644 --- a/tests/integration/callbacks/test_basic_callback.py +++ b/tests/integration/callbacks/test_basic_callback.py @@ -5,7 +5,6 @@ import time import numpy as np -import werkzeug from dash_test_components import ( AsyncComponent, @@ -305,11 +304,6 @@ def set_out(opts): dash_duo.select_dcc_dropdown("#dd", "opt{}".format(i)) -@pytest.mark.xfail( - condition=werkzeug.__version__ in ("2.1.0", "2.1.1"), - reason="Bug with 204 and Transfer-Encoding", - strict=False, -) @pytest.mark.parametrize("refresh", [False, True]) def test_cbsc007_parallel_updates(refresh, dash_duo): # This is a funny case, that seems to mostly happen with dcc.Location From d28bf30a11c05bbee47759499555a4c99a3f75b5 Mon Sep 17 00:00:00 2001 From: philippe Date: Wed, 18 Jun 2025 08:42:12 -0400 Subject: [PATCH 3/3] fix lint --- .lintstagedrc.js | 2 +- .../tests/integration/store/test_data_lifecycle.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.lintstagedrc.js b/.lintstagedrc.js index 2f636a5a8d..e4449e59cd 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -34,7 +34,7 @@ module.exports = { `${venvBin("black")} --check ${filenames.join(" ")}`, ], - "tests/**/*.py": (filenames) => [ + "**/tests/**/*.py": (filenames) => [ `${venvBin("python")} -m pylint -d all -e C0410,C0413,W0109 --rcfile=.pylintrc ${filenames.join( " " )}`, diff --git a/components/dash-core-components/tests/integration/store/test_data_lifecycle.py b/components/dash-core-components/tests/integration/store/test_data_lifecycle.py index a5ca23984d..e3d5d7da17 100644 --- a/components/dash-core-components/tests/integration/store/test_data_lifecycle.py +++ b/components/dash-core-components/tests/integration/store/test_data_lifecycle.py @@ -1,5 +1,3 @@ -import pytest - import dash.testing.wait as wait