We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be58a95 commit 1c77793Copy full SHA for 1c77793
tools/tests/generate_reference_results.py
@@ -53,8 +53,14 @@ def render_reference_results_info(
53
arguments_used: SystemtestArguments,
54
time: str):
55
def sha256sum(filename):
56
+ # Implementation from https://stackoverflow.com/a/44873382/2254346,
57
+ # compatible with Python 3.10.
58
+ h = hashlib.sha256()
59
+ mv = memoryview(bytearray(128 * 1024))
60
with open(filename, 'rb', buffering=0) as f:
- return hashlib.file_digest(f, 'sha256').hexdigest()
61
+ while n := f.readinto(mv):
62
+ h.update(mv[:n])
63
+ return h.hexdigest()
64
65
files = []
66
for reference_result in reference_results:
0 commit comments