Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes/dev/13566.other.rst
Original file line number Diff line number Diff line change
@@ -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`).
1 change: 1 addition & 0 deletions doc/changes/names.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions mne/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down
Loading