Skip to content

Commit 6107481

Browse files
Merge branch 'dev' into fix-is-outside-range-function
2 parents 067e587 + 9bebdce commit 6107481

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+522
-329
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ jobs:
294294
. venv/bin/activate && rm -rf components/dash-core-components/dash_core_components
295295
cd components/dash-core-components
296296
TESTFILES=$(circleci tests glob "tests/integration/**/test_*.py" | circleci tests split --split-by=timings)
297-
pytest --headless --nopercyfinalize --junitxml=test-reports/junit_intg.xml --junitprefix="components.dash-core-components" ${TESTFILES}
297+
pytest --headless --nopercyfinalize --junitxml=test-reports/junit_intg.xml --junitprefix="components.dash-core-components" ${TESTFILES} --reruns 3
298298
- store_artifacts:
299299
path: ~/dash/components/dash-core-components/test-reports
300300
- store_test_results:
@@ -385,7 +385,7 @@ jobs:
385385
PERCY_ENABLE: 1
386386
PERCY_PARALLEL_TOTAL: -1
387387

388-
parallelism: 4
388+
parallelism: 5
389389

390390
steps:
391391
- checkout:

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
All notable changes to `dash` will be documented in this file.
33
This project adheres to [Semantic Versioning](https://semver.org/).
44

5+
## [2.3.1] - 2022-03-29
6+
7+
### Fixed
8+
9+
- [#1963](https://github.com/plotly/dash/pull/1963) Fix [#1780](https://github.com/plotly/dash/issues/1780) flask shutdown deprecation warning when running dashduo threaded tests.
10+
- [#1995](https://github.com/plotly/dash/pull/1995) Fix [#1992](https://github.com/plotly/dash/issues/1992) ImportError: cannot import name 'get_current_traceback' from 'werkzeug.debug.tbtools'.
11+
512
## [2.3.0] - 2022-03-13
613

714
### Added

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Built on top of [Plotly.js](https://github.com/plotly/plotly.js), [React](https:
2323
|![Sample Dash App](https://user-images.githubusercontent.com/1280389/30086128-9bb4a28e-9267-11e7-8fe4-bbac7d53f2b0.gif) | Here’s a simple example of a Dash App that ties a Dropdown to a Plotly Graph. As the user selects a value in the Dropdown, the application code dynamically exports data from Google Finance into a Pandas DataFrame. This app was written in just **43** lines of code ([view the source](https://gist.github.com/chriddyp/3d2454905d8f01886d651f207e2419f0)). |
2424
|![Crossfiltering Dash App](https://user-images.githubusercontent.com/1280389/30086123-97c58bde-9267-11e7-98a0-7f626de5199a.gif)|Dash app code is declarative and reactive, which makes it easy to build complex apps that contain many interactive elements. Here’s an example with 5 inputs, 3 outputs, and cross filtering. This app was composed in just 160 lines of code, all of which were Python.|
2525
|![Dash App with Mapbox map showing walmart store openings](https://user-images.githubusercontent.com/1280389/30086299-768509d0-9268-11e7-8e6b-626ac9ca512c.gif)| Dash uses [Plotly.js](https://github.com/plotly/plotly.js) for charting. About 50 chart types are supported, including maps. |
26-
|![Financial report](https://github.com/plotly/dash-docs/blob/516f80c417051406210b94ea23a6d3b6cd84d146/assets/images/gallery/dash-financial-report.gif)| Dash isn't just for dashboards. You have full control over the look and feel of your applications. Here's a Dash App that's styled to look like a PDF report. |
26+
|![Financial report](https://user-images.githubusercontent.com/2678795/161153710-57952401-6e07-42d5-ba3e-bab6419998c7.gif)| Dash isn't just for dashboards. You have full control over the look and feel of your applications. Here's a Dash App that's styled to look like a PDF report. |
2727

2828
To learn more about Dash, read the [extensive announcement letter](https://medium.com/@plotlygraphs/introducing-dash-5ecf7191b503) or [jump in with the user guide](https://plotly.com/dash).
2929

@@ -53,4 +53,4 @@ Enterprise AI Features: Everything that your data science team needs to rapidly
5353

5454
See [https://plotly.com/contact-us/](https://plotly.com/contact-us/) to get in touch.
5555

56-
![image](https://images.prismic.io/plotly-marketing-website/493eec39-8467-4610-b9d0-d6ad3ea61423_Dash+Open+source%2BDash+enterprise2-01.jpg?auto=compress,format)
56+
![Dash Enterprise](https://user-images.githubusercontent.com/2678795/161155614-21c54a22-f821-4dda-b910-ee27e27fb5f2.png)

components/dash-core-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"private::lint.prettier": "prettier --config .prettierrc src/**/*.js --list-different",
2222
"prepublishOnly": "rm -rf lib && babel src --out-dir lib --copy-files && rm -rf lib/jl/ lib/*.jl",
2323
"test": "run-s -c lint test:intg test:pyimport",
24-
"test:intg": "pytest --nopercyfinalize --headless tests/integration",
24+
"test:intg": "pytest --nopercyfinalize --headless tests/integration --reruns 3",
2525
"test:pyimport": "python -m unittest tests/test_dash_import.py",
2626
"prebuild:js": "cp node_modules/plotly.js-dist-min/plotly.min.js dash_core_components_base/plotly.min.js && cp node_modules/mathjax/es5/tex-svg.js dash_core_components_base/mathjax.js",
2727
"build:js": "webpack --mode production",

components/dash-core-components/tests/integration/calendar/test_date_picker_single.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import time
44

55
import pytest
6+
import werkzeug
7+
68
from dash import Dash, Input, Output, html, dcc, no_update
79

810

@@ -73,6 +75,11 @@ def test_dtps010_local_and_session_persistence(dash_dcc):
7375
assert dash_dcc.get_logs() == []
7476

7577

78+
@pytest.mark.xfail(
79+
condition=werkzeug.__version__ in ("2.1.0", "2.1.1"),
80+
reason="Bug with 204 and Transfer-Encoding",
81+
strict=False,
82+
)
7683
def test_dtps011_memory_persistence(dash_dcc):
7784
app = Dash(__name__)
7885
app.layout = html.Div(

components/dash-core-components/tests/integration/dropdown/test_dynamic_options.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ def update_options(search_value):
2424
dash_dcc.start_server(app)
2525

2626
# Get the inner input used for search value.
27-
dropdown = dash_dcc.find_element("#my-dynamic-dropdown")
28-
input_ = dropdown.find_element_by_css_selector("input")
27+
input_ = dash_dcc.find_element("#my-dynamic-dropdown input")
2928

3029
# Focus on the input to open the options menu
3130
input_.send_keys("x")
@@ -36,15 +35,15 @@ def update_options(search_value):
3635
input_.clear()
3736
input_.send_keys("o")
3837

39-
options = dropdown.find_elements_by_css_selector(".VirtualizedSelectOption")
38+
options = dash_dcc.find_elements("#my-dynamic-dropdown .VirtualizedSelectOption")
4039

4140
# Should show all options.
4241
assert len(options) == 3
4342

4443
# Searching for `on`
4544
input_.send_keys("n")
4645

47-
options = dropdown.find_elements_by_css_selector(".VirtualizedSelectOption")
46+
options = dash_dcc.find_elements("#my-dynamic-dropdown .VirtualizedSelectOption")
4847

4948
assert len(options) == 1
5049
print(options)

components/dash-core-components/tests/integration/graph/test_graph_varia.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import pytest
33
import time
44
import json
5+
6+
import werkzeug
7+
58
from dash import Dash, Input, Output, State, dcc, html
69
from dash.exceptions import PreventUpdate
710
from selenium.webdriver.common.by import By
@@ -128,7 +131,7 @@ def show_relayout_data(data):
128131

129132
# use this opportunity to test restyleData, since there are multiple
130133
# traces on this graph
131-
legendToggle = dash_dcc.driver.find_element_by_css_selector(
134+
legendToggle = dash_dcc.find_element(
132135
"#example-graph .traces:first-child .legendtoggle"
133136
)
134137
legendToggle.click()
@@ -142,7 +145,7 @@ def show_relayout_data(data):
142145
)
143146

144147
# and test relayoutData while we're at it
145-
autoscale = dash_dcc.driver.find_element_by_css_selector("#example-graph .ewdrag")
148+
autoscale = dash_dcc.find_element("#example-graph .ewdrag")
146149
autoscale.click()
147150
autoscale.click()
148151
dash_dcc.wait_for_text_to_equal("#relayout-data", '{"xaxis.autorange": true}')
@@ -185,6 +188,10 @@ def render_content(click, prev_graph):
185188
assert dash_dcc.get_logs() == []
186189

187190

191+
@pytest.mark.skipif(
192+
werkzeug.__version__ in ("2.1.0", "2.1.1"),
193+
reason="Bug with no_update 204 responses get Transfer-Encoding header.",
194+
)
188195
@pytest.mark.parametrize("is_eager", [True, False])
189196
def test_grva004_graph_prepend_trace(dash_dcc, is_eager):
190197
app = Dash(__name__, eager_loading=is_eager)
@@ -357,6 +364,10 @@ def display_data(trigger, fig):
357364
assert dash_dcc.get_logs() == []
358365

359366

367+
@pytest.mark.skipif(
368+
werkzeug.__version__ in ("2.1.0", "2.1.1"),
369+
reason="Bug with no_update 204 responses get Transfer-Encoding header.",
370+
)
360371
@pytest.mark.parametrize("is_eager", [True, False])
361372
def test_grva005_graph_extend_trace(dash_dcc, is_eager):
362373
app = Dash(__name__, eager_loading=is_eager)

components/dash-core-components/tests/integration/link/test_absolute_path.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def extras(t):
4949
dcc.Link(
5050
children="Absolute Path",
5151
id="link1",
52-
href=dash_dcc.server.url + "/extra/eseehc",
52+
href="/extra/eseehc",
5353
refresh=True,
5454
),
5555
dcc.Location(id="url", refresh=False),

components/dash-core-components/tests/integration/link/test_link_event.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ def display_page(pathname):
9393
dash_dcc.wait_for_text_to_equal("#page-content", "You are on page /test-link")
9494

9595
wait.until(
96-
lambda: test_link.get_attribute("href") == "http://localhost:8050/test-link", 3
96+
lambda: test_link.get_attribute("href")
97+
== "http://localhost:{}/test-link".format(dash_dcc.server.port),
98+
3,
9799
)
98100
wait.until(lambda: call_count.value == 2, 3)
99101

components/dash-core-components/tests/integration/location/test_location_callback.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ def update_pathname(n_clicks, current_pathname):
9393
# Check that link updates pathname
9494
dash_dcc.find_element("#test-link").click()
9595
until(
96-
lambda: dash_dcc.driver.current_url.replace("http://localhost:8050", "")
96+
lambda: dash_dcc.driver.current_url.replace(
97+
"http://localhost:{}".format(dash_dcc.server.port), ""
98+
)
9799
== "/test/pathname",
98100
3,
99101
)

0 commit comments

Comments
 (0)