]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-99016: Make build scripts compatible with Python 3.8 (GH-99017). (GH-99693)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 22 Nov 2022 15:46:18 +0000 (17:46 +0200)
committerGitHub <noreply@github.com>
Tue, 22 Nov 2022 15:46:18 +0000 (17:46 +0200)
(cherry picked from commit f520d720f667c87f7b70ed86ea58d73892d6b969)

Misc/NEWS.d/next/Build/2022-11-02-19-25-07.gh-issue-99016.R05NkD.rst [new file with mode: 0644]
Tools/scripts/generate_opcode_h.py

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 (file)
index 0000000..df189da
--- /dev/null
@@ -0,0 +1 @@
+Fix build with ``PYTHON_FOR_REGEN=python3.8``.
index 6a04297879f2cb8ebe2a316d3e3977b9959ab4cb..5b225f27c4f7cf8a8ffe1a652657940f4483b5eb 100644 (file)
@@ -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)