Skip to content

[BUG] + in version string breaks fingerprint system #995

@anders-kiaer

Description

@anders-kiaer

Describe your context

  • replace the result of pip list | grep dash below
dash                                  1.5.1                           
dash-core-components                  1.4.0                           
dash-daq                              0.2.2                           
dash-html-components                  1.0.1                           
dash-renderer                         1.2.0                           
dash-table                            4.5.0  

Describe the bug

When going from dash==1.4 to dash==1.5, we experienced a breaking change in the custom Dash components we use.

It took some hours to debug, but the reason was found to be related to the new "fingerprint" system in Dash. In our project, we use the setuptools_scm package (by the Python Packaging Authority) in order to have a versioning system that automatically is linked to the git repo tags. This makes continuous deployment to e.g. Pypi easy and robust wrt. keeping versions consistent.

I.e. instead of

__version__ = package['version']

in the component package, we use something like

__version__ = get_distribution(__name__).version

This worked until dash==1.5, then it broke on non-release-versions due to automatic tags of the type
1.0.0.dev5+af4304c.d20191103, where the tag includes a +. See the default tag formats.

Changing the line above to

__version__ = get_distribution(__name__).version.replace("+", ".")

is one workaround that gets the third party components to also work on dash==1.5

Expected behavior

setuptools_scm provided versions to work also in dash>=1.5.

Suggested solution

Change this line in Dash's build_fingerprint to also replace + with _?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions