https://github.com/python/cpython/commit/82d56e440a21a1bbcaf336eecdd0615cef5861c8
commit: 82d56e440a21a1bbcaf336eecdd0615cef5861c8
branch: 3.14
author: Hugo van Kemenade <[email protected]>
committer: hugovk <[email protected]>
date: 2026-10-13T09:26:46Z
summary:

[3.14] Fix mypy bump for Tools/peg_generator/pegen/build.py (GH-159256) 
(#159300)

(cherry picked from commit ce5c012a8acf29b111db42eba342d72885f3e8be)

files:
M Tools/peg_generator/pegen/build.py

diff --git a/Tools/peg_generator/pegen/build.py 
b/Tools/peg_generator/pegen/build.py
index 44a58581686a4f7..0cd79ecdd403624 100644
--- a/Tools/peg_generator/pegen/build.py
+++ b/Tools/peg_generator/pegen/build.py
@@ -149,9 +149,10 @@ def compile_c_extension(
         # HACK: The location of pyconfig.h has moved within our build, and
         # setuptools hasn't updated for it yet. So add the path manually for 
now
         
include_dirs.append(pathlib.Path(sysconfig.get_config_h_filename()).parent)
+    sources = [generated_source_path]
     extension = Extension(
         extension_name,
-        sources=[generated_source_path],
+        sources=sources,
         extra_compile_args=extra_compile_args,
         extra_link_args=extra_link_args,
     )
@@ -208,19 +209,19 @@ def compile_c_extension(
                 ]
             )
     else:
-        extension.sources[0:0] = common_sources
+        sources[0:0] = common_sources
 
     # Compile the source code to object files.
     ext_path = cmd.get_ext_fullpath(extension_name)
-    if newer_group(extension.sources, ext_path, "newer"):
+    if newer_group(sources, ext_path, "newer"):
         objects = compiler.compile(
-            extension.sources,
+            sources,
             output_dir=cmd.build_temp,
             debug=cmd.debug,
             extra_postargs=extra_compile_args,
         )
     else:
-        objects = compiler.object_filenames(extension.sources, 
output_dir=cmd.build_temp)
+        objects = compiler.object_filenames(sources, output_dir=cmd.build_temp)
     # The cmd.get_libraries() call needs a valid compiler attribute or we will
     # get an incorrect library name on the free-threaded Windows build.
     cmd.compiler = compiler

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to