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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix build with ``PYTHON_FOR_REGEN=python3.8``.
4 changes: 2 additions & 2 deletions Tools/build/generate_levenshtein_examples.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Generate 10,000 unique examples for the Levenshtein short-circuit tests."""

import argparse
from functools import cache
from functools import lru_cache
import json
import os.path
from random import choices, randrange
Expand All @@ -22,7 +22,7 @@ def _substitution_cost(ch_a, ch_b):
return _MOVE_COST


@cache
@lru_cache(None)
def levenshtein(a, b):
if not a or not b:
return (len(a) + len(b)) * _MOVE_COST
Expand Down
2 changes: 1 addition & 1 deletion Tools/build/generate_opcode_h.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def main(opcode_py, outfile='Include/opcode.h', internaloutfile='Include/interna
opname_including_specialized[255] = 'DO_TRACING'
used[255] = True

with (open(outfile, 'w') as fobj, open(internaloutfile, 'w') as iobj):
with open(outfile, 'w') as fobj, open(internaloutfile, 'w') as iobj:
fobj.write(header)
iobj.write(internal_header)

Expand Down