diff --git a/temporalio/worker/_worker.py b/temporalio/worker/_worker.py index b6205d3ca..06a312205 100644 --- a/temporalio/worker/_worker.py +++ b/temporalio/worker/_worker.py @@ -633,7 +633,10 @@ def load_default_build_id(*, memoize: bool = True) -> str: # * Using the loader's get_code in rare cases can cause a compile() got_temporal_code = False - m = hashlib.md5() + if sys.version_info < (3, 9): + m = hashlib.md5() + else: + m = hashlib.md5(usedforsecurity=False) for mod_name in sorted(sys.modules): # Try to read code code = _get_module_code(mod_name)