https://github.com/python/cpython/commit/ce5c012a8acf29b111db42eba342d72885f3e8be
commit: ce5c012a8acf29b111db42eba342d72885f3e8be
branch: main
author: Hugo van Kemenade <[email protected]>
committer: hugovk <[email protected]>
date: 2026-10-12T23:46:02+03:00
summary:
Fix mypy bump for Tools/peg_generator/pegen/build.py (#159256)
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 ce079adafcf4c7c..eb556e504eb76e2 100644
--- a/Tools/peg_generator/pegen/build.py
+++ b/Tools/peg_generator/pegen/build.py
@@ -155,9 +155,10 @@ def compile_c_extension(
# HACK: Our output directory for free-threaded builds has moved,
and so
# tests running in-tree require our sys.executable directory for
libs
library_dirs.append(str(pathlib.Path(sys.executable).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,
)
@@ -215,19 +216,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]