summaryrefslogtreecommitdiffstats
path: root/Lib/random.py
diff options
context:
space:
mode:
authorAlex Waygood <Alex.Waygood@Gmail.com>2023-10-02 22:56:31 (GMT)
committerGitHub <noreply@github.com>2023-10-02 22:56:31 (GMT)
commit21a6263020db17020b2886f996bc23aa8cb7fbdf (patch)
tree8b6216f85d5668a4c07c4e324242b837abeb543a /Lib/random.py
parent4596c76d1a7650fd4650c814dc1d40d664cd8fb4 (diff)
downloadcpython-21a6263020db17020b2886f996bc23aa8cb7fbdf.zip
cpython-21a6263020db17020b2886f996bc23aa8cb7fbdf.tar.gz
cpython-21a6263020db17020b2886f996bc23aa8cb7fbdf.tar.bz2
gh-109653: Reduce the import time of `random` by 60% (#110221)
Diffstat (limited to 'Lib/random.py')
-rw-r--r--Lib/random.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/random.py b/Lib/random.py
index 1d789b1..1cfc2ba 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -65,7 +65,7 @@ import _random
try:
# hashlib is pretty heavy to load, try lean internal module first
- from _sha512 import sha512 as _sha512
+ from _sha2 import sha512 as _sha512
except ImportError:
# fallback to official implementation
from hashlib import sha512 as _sha512