FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-99016: Make build scripts compatible with Python 3.8 by serhiy-storchaka · Pull Request #99017 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) .rst  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL