Skip to content

update flask #3333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
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
12 changes: 10 additions & 2 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(" ")}`,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import time

import pytest
import werkzeug

from dash import Dash, Input, Output, html, dcc, no_update

Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import time
import json

import werkzeug
from selenium.webdriver import ActionChains

from dash import Dash, Input, Output, State, dcc, html
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
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)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import werkzeug

from dash import Dash, Input, Output, dcc, html
from dash.exceptions import PreventUpdate
import json
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions requirements/install.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 0 additions & 6 deletions tests/integration/callbacks/test_basic_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import time

import numpy as np
import werkzeug

from dash_test_components import (
AsyncComponent,
Expand Down Expand Up @@ -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
Expand Down