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

Diff for: .circleci/config.yml

+2-2
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:

Diff for: CHANGELOG.md

+7
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

Diff for: README.md

+2-2
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)

Diff for: components/dash-core-components/package.json

+1-1
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",

Diff for: components/dash-core-components/tests/integration/calendar/test_date_picker_single.py

+7
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(

Diff for: components/dash-core-components/tests/integration/dropdown/test_dynamic_options.py

+3-4
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)

Diff for: components/dash-core-components/tests/integration/graph/test_graph_varia.py

+13-2
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)

Diff for: components/dash-core-components/tests/integration/link/test_absolute_path.py

+1-1
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),

Diff for: components/dash-core-components/tests/integration/link/test_link_event.py

+3-1
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

Diff for: components/dash-core-components/tests/integration/location/test_location_callback.py

+3-1
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
)

Diff for: components/dash-core-components/tests/integration/store/test_data_lifecycle.py

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1+
import pytest
2+
import werkzeug
3+
14
import dash.testing.wait as wait
25

36

7+
@pytest.mark.xfail(
8+
condition=werkzeug.__version__ in ("2.1.0", "2.1.1"),
9+
reason="Bug with 204 and Transfer-Encoding",
10+
strict=False,
11+
)
412
def test_stdl001_data_lifecycle_with_different_condition(store_app, dash_dcc):
513
dash_dcc.start_server(store_app)
614

Diff for: components/dash-core-components/tests/integration/tab/test_tabs_with_graphs.py

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import werkzeug
2+
13
from dash import Dash, Input, Output, dcc, html
24
from dash.exceptions import PreventUpdate
35
import json
@@ -119,6 +121,11 @@ def render_content(tab):
119121
assert dash_dcc.get_logs() == []
120122

121123

124+
@pytest.mark.xfail(
125+
condition=werkzeug.__version__ in ("2.1.0", "2.1.1"),
126+
reason="Bug with 204 and Transfer-Encoding",
127+
strict=False,
128+
)
122129
@pytest.mark.parametrize("is_eager", [True, False])
123130
def test_tabs_render_without_selected(dash_dcc, is_eager):
124131
app = Dash(__name__, eager_loading=is_eager)

Diff for: components/dash-html-components/scripts/data/attributes.json

+8-26
Original file line numberDiff line numberDiff line change
@@ -417,12 +417,6 @@
417417
],
418418
"description": "Indicates the upper bound of the lower range."
419419
},
420-
"manifest": {
421-
"elements": [
422-
"html"
423-
],
424-
"description": "Specifies the URL of the document's cache manifest. Note: This attribute is obsolete, use <link rel=\"manifest\"> instead."
425-
},
426420
"max": {
427421
"elements": [
428422
"input",
@@ -511,7 +505,7 @@
511505
"details",
512506
"dialog"
513507
],
514-
"description": "Indicates whether the the contents are currently visible (in the case of a <details> element) or whether the dialog is active and can be interacted with (in the case of a <dialog> element)."
508+
"description": "Indicates whether the contents are currently visible (in the case of a <details> element) or whether the dialog is active and can be interacted with (in the case of a <dialog> element)."
515509
},
516510
"optimum": {
517511
"elements": [
@@ -591,6 +585,12 @@
591585
],
592586
"description": "Indicates whether the list should be displayed in a descending order instead of a ascending."
593587
},
588+
"role": {
589+
"elements": [
590+
"Globalattribute"
591+
],
592+
"description": "Defines an explicit role for an element for use by assistive technologies."
593+
},
594594
"rows": {
595595
"elements": [
596596
"textarea"
@@ -616,12 +616,6 @@
616616
],
617617
"description": "Defines the cells that the header test (defined in the th element) relates to."
618618
},
619-
"scoped": {
620-
"elements": [
621-
"style"
622-
],
623-
"description": ""
624-
},
625619
"selected": {
626620
"elements": [
627621
"option"
@@ -714,12 +708,6 @@
714708
],
715709
"description": "Defines CSS styles which will override styles previously set."
716710
},
717-
"summary": {
718-
"elements": [
719-
"table"
720-
],
721-
"description": ""
722-
},
723711
"tabIndex": {
724712
"elements": [
725713
"Globalattribute"
@@ -852,6 +840,7 @@
852840
"hidden",
853841
"id",
854842
"lang",
843+
"role",
855844
"spellCheck",
856845
"style",
857846
"tabIndex",
@@ -1110,9 +1099,6 @@
11101099
"marquee": [
11111100
"loop"
11121101
],
1113-
"html": [
1114-
"manifest"
1115-
],
11161102
"source": [
11171103
"media",
11181104
"sizes",
@@ -1122,7 +1108,6 @@
11221108
],
11231109
"style": [
11241110
"media",
1125-
"scoped",
11261111
"type"
11271112
],
11281113
"map": [
@@ -1148,9 +1133,6 @@
11481133
"colgroup": [
11491134
"span"
11501135
],
1151-
"table": [
1152-
"summary"
1153-
],
11541136
"menu": [
11551137
"type"
11561138
],

Diff for: components/dash-html-components/scripts/generate-components.js

-5
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,6 @@ function generatePropTypes(element, attributes) {
145145
*/
146146
'key': PropTypes.string,
147147
148-
/**
149-
* The ARIA role attribute
150-
*/
151-
'role': PropTypes.string,
152-
153148
/**
154149
* A wildcard data attribute
155150
*/

0 commit comments

Comments
 (0)