Skip to content

Commit 3b48aa3

Browse files
authored
Merge pull request #1377 from waralex/jl_generator_fix
Critical fix for julia components generator: replacing hash with md5
2 parents c68bcc2 + a085b5a commit 3b48aa3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dash/development/_jl_components_generation.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import sys
1010
import importlib
1111
import uuid
12+
import hashlib
1213

1314
from ._all_keywords import julia_keywords
1415
from ._py_components_generation import reorder_props
@@ -407,7 +408,10 @@ def generate_toml_file(project_shortname, pkg_data):
407408
project_ver = pkg_data.get("version")
408409
package_name = jl_package_name(project_shortname)
409410
u = uuid.UUID(jl_dash_uuid)
410-
package_uuid = uuid.UUID(hex=u.hex[:-12] + hex(hash(package_name))[-12:])
411+
412+
package_uuid = uuid.UUID(
413+
hex=u.hex[:-12] + hashlib.md5(package_name.encode("utf-8")).hexdigest()[-12:]
414+
)
411415

412416
authors_string = (
413417
'authors = ["{}"]\n'.format(package_author) if package_author else ""

0 commit comments

Comments
 (0)