From: Serhiy Storchaka Date: Tue, 22 Nov 2022 15:46:18 +0000 (+0200) Subject: [3.11] gh-99016: Make build scripts compatible with Python 3.8 (GH-99017). (GH-99693) X-Git-Tag: v3.11.1~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49f2eee0a34af74d6c68969243d47ada79298975;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-99016: Make build scripts compatible with Python 3.8 (GH-99017). (GH-99693) (cherry picked from commit f520d720f667c87f7b70ed86ea58d73892d6b969) --- diff --git a/Misc/NEWS.d/next/Build/2022-11-02-19-25-07.gh-issue-99016.R05NkD.rst b/Misc/NEWS.d/next/Build/2022-11-02-19-25-07.gh-issue-99016.R05NkD.rst new file mode 100644 index 000000000000..df189daca3a2 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2022-11-02-19-25-07.gh-issue-99016.R05NkD.rst @@ -0,0 +1 @@ +Fix build with ``PYTHON_FOR_REGEN=python3.8``. diff --git a/Tools/scripts/generate_opcode_h.py b/Tools/scripts/generate_opcode_h.py index 6a04297879f2..5b225f27c4f7 100644 --- a/Tools/scripts/generate_opcode_h.py +++ b/Tools/scripts/generate_opcode_h.py @@ -102,7 +102,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)