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

Removed deprecated dependencies that are now integrated #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Lew-Goldstein
Copy link

dash_bootstrap_components, dash_html_components, and dash.dependencies are now integrated into core dash, so modified Import statements to reflect this change in the demo app.

About

Description of changes

Pre-Merge checklist

  • The project was correctly built with npm run build.
  • If there was any conflict, it was solved correctly.
  • All changes were documented in CHANGELOG.md.
  • All tests on CircleCI have passed.
  • All Percy visual changes have been approved.
  • Two people have 💃'd the pull request. You can be one of these people if you are a Dash core contributor.

Reference Issues

Closes #[issue number]

Other comments

dash_bootstrap_components, dash_html_components, and dash.dependencies are now integrated into core dash, so modified Import statements to reflect this change.
Copy link
Collaborator

@jourdain jourdain left a comment

Choose a reason for hiding this comment

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

Rather than commenting then, I would remove the lines unless you want to add a comment stating this is for dash<=version

Copy link
Member

@ndrezn ndrezn left a comment

Choose a reason for hiding this comment

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

Is it worth writing an import that supports various versions, like:

import dash
if hasattr(dash, "html"):
    html = dash.html
else:
    import dash_html_components as html

to catch dcc/Input/Output/... if users are running this on Dash < 2.0.0, or should we expect only >2.0 to be using these examples?

@alexcjohnson
Copy link
Collaborator

For demos/examples, at this point I think assuming Dash 2.x is fine. If these imports were inside the package though we'd definitely still want 1.x fallbacks.

Comment on lines 1 to +2
import dash
from dash import dcc, html, Input, Output
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nonblocking, but some styleguides/linters complain that this is a duplicate import. This is why most of our examples now explicitly import everything you're going to use - in this case that would add Dash and no_update which then lose the dash. prefix below - so you can drop the plain import dash.

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.

4 participants