Skip to content

Commit b0a7b4e

Browse files
authored
Flag MD5 as non-security related usage for FIPS compatibility (#472)
1 parent 8dce5b5 commit b0a7b4e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

temporalio/worker/_worker.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,10 @@ def load_default_build_id(*, memoize: bool = True) -> str:
633633
# * Using the loader's get_code in rare cases can cause a compile()
634634

635635
got_temporal_code = False
636-
m = hashlib.md5()
636+
if sys.version_info < (3, 9):
637+
m = hashlib.md5()
638+
else:
639+
m = hashlib.md5(usedforsecurity=False)
637640
for mod_name in sorted(sys.modules):
638641
# Try to read code
639642
code = _get_module_code(mod_name)

0 commit comments

Comments
 (0)