diff --git a/doc/changes/dev/13566.other.rst b/doc/changes/dev/13566.other.rst new file mode 100644 index 00000000000..20f2066726a --- /dev/null +++ b/doc/changes/dev/13566.other.rst @@ -0,0 +1 @@ +Remove legacy Python-version compatibility checks in ``mne.utils.misc._empty_hash`` now that ``usedforsecurity=False`` is always supported, by :newcontrib:`Varun Kasyap Pentamaraju` (:gh:`13566`). diff --git a/doc/changes/names.inc b/doc/changes/names.inc index 77e665ec6ed..cc6800a1b49 100644 --- a/doc/changes/names.inc +++ b/doc/changes/names.inc @@ -336,6 +336,7 @@ .. _Tziona NessAiver: https://github.com/TzionaN .. _user27182: https://github.com/user27182 .. _Valerii Chirkov: https://github.com/vagechirkov +.. _Varun Kasyap Pentamaraju: https://github.com/varunkasyap .. _Velu Prabhakar Kumaravel: https://github.com/vpKumaravel .. _Victor Ferat: https://github.com/vferat .. _Victoria Peterson: https://github.com/vpeterson diff --git a/mne/utils/misc.py b/mne/utils/misc.py index 066883e8c8f..12e22197c76 100644 --- a/mne/utils/misc.py +++ b/mne/utils/misc.py @@ -32,13 +32,8 @@ def _identity_function(x): return x -# TODO: no longer needed when py3.9 is minimum supported version def _empty_hash(kind="md5"): - func = getattr(hashlib, kind) - if "usedforsecurity" in inspect.signature(func).parameters: - return func(usedforsecurity=False) - else: - return func() + return getattr(hashlib, kind)(usedforsecurity=False) def _pl(x, non_pl="", pl="s"):