summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2022-11-23 22:47:31 (GMT)
committerGitHub <noreply@github.com>2022-11-23 22:47:31 (GMT)
commitc69cfcdb116c4907b306e2bd0e263d5ceba48bd5 (patch)
tree4c8ed7816621c4ab999cdfbfcef6e1f580461ca2 /Lib
parent57dfb1c4c8d5298494f121d1686a77a11612fd64 (diff)
downloadcpython-c69cfcdb116c4907b306e2bd0e263d5ceba48bd5.zip
cpython-c69cfcdb116c4907b306e2bd0e263d5ceba48bd5.tar.gz
cpython-c69cfcdb116c4907b306e2bd0e263d5ceba48bd5.tar.bz2
closes gh-99508: fix `TypeError` in `Lib/importlib/_bootstrap_external.py` (GH-99635)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/importlib/_bootstrap_external.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index f4dbbeb..71a1606 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -1144,7 +1144,8 @@ class SourceLoader(_LoaderBasics):
source_mtime is not None):
if hash_based:
if source_hash is None:
- source_hash = _imp.source_hash(source_bytes)
+ source_hash = _imp.source_hash(_RAW_MAGIC_NUMBER,
+ source_bytes)
data = _code_to_hash_pyc(code_object, source_hash, check_source)
else:
data = _code_to_timestamp_pyc(code_object, source_mtime,