Skip to content
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

Fix #1383 prevent_initial_call positional arg regression #1384

Merged
merged 8 commits into from
Aug 27, 2020

Conversation

alexcjohnson
Copy link
Collaborator

@alexcjohnson alexcjohnson commented Aug 27, 2020

Fixes #1383

  • I have run the tests locally and they passed. (refer to testing section in contributing)
  • I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR
  • I have added entry in the CHANGELOG.md

@@ -193,3 +193,33 @@ def o2(i, s):
dash_duo.start_server(app)
dash_duo.wait_for_text_to_equal("#out1", "1: High")
dash_duo.wait_for_text_to_equal("#out2", "2: High")


def test_cbva005_tuple_args(dash_duo):
Copy link
Collaborator Author

@alexcjohnson alexcjohnson Aug 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL - I thought this was going to be broken:

flat_args += arg if isinstance(arg, (list, tuple)) else [arg]

but turns out even though a = [] + () is an error, a = []; a += () is fine https://python-forum.io/Thread-concatenating-list-with-tuple

Anyway now it's tested :)

@@ -6,6 +6,7 @@ pytest-mock==2.0.0;python_version=="2.7"
lxml==4.5.0
selenium==3.141.0
percy==2.0.2
cryptography==3.0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to fix https://app.circleci.com/pipelines/github/plotly/dash/1693/workflows/002acae1-f322-4389-928c-f2c14deaab1b/jobs/27184

Seems like there's something weird going on in the latest release (tonight!) of cryptography, which is pulled in by requests - see eg pyca/cryptography#5412

Copy link
Contributor

@Marc-Andre-Rivet Marc-Andre-Rivet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃

@alexcjohnson alexcjohnson merged commit d9a8d9c into dev Aug 27, 2020
@alexcjohnson alexcjohnson deleted the 1383-callback-args-fix branch August 27, 2020 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prevent_initial_call in callback throws exception [BUG]
2 participants