]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-108455: peg_generator: use `types-setuptools==68.1.0.1` in CI (#108697)
authorAlex Waygood <Alex.Waygood@Gmail.com>
Thu, 31 Aug 2023 07:41:25 +0000 (08:41 +0100)
committerGitHub <noreply@github.com>
Thu, 31 Aug 2023 07:41:25 +0000 (08:41 +0100)
Tools/peg_generator/mypy.ini
Tools/peg_generator/pegen/build.py
Tools/requirements-dev.txt

index 55429dd76eba686f38a6a0b2ee2d0c109969babb..8820d77b36f646936ecd617585d6c45c2ed01d2e 100644 (file)
@@ -13,8 +13,3 @@ enable_error_code = truthy-bool,ignore-without-code
 # except for a few settings that can't yet be enabled:
 warn_return_any = False
 warn_unreachable = False
-
-[mypy-pegen.build]
-# we need this for now due to some missing annotations
-# in typeshed's stubs for setuptools
-disallow_untyped_calls = False
index 998cd41428db190cc6f9628ba00d9018c78dc6fd..6b04ae9ec7025c6fa87fc30d33918bf81f1a2222 100644 (file)
@@ -148,8 +148,7 @@ def compile_c_extension(
     cmd.include_dirs = include_dirs
     if build_dir:
         cmd.build_temp = build_dir
-    # A deficiency in typeshed's stubs means we have to type: ignore:
-    cmd.ensure_finalized()  # type: ignore[attr-defined]
+    cmd.ensure_finalized()
 
     compiler = new_compiler()
     customize_compiler(compiler)
@@ -160,8 +159,8 @@ def compile_c_extension(
         library_filename = compiler.library_filename(extension_name, output_dir=library_dir)
         if newer_group(common_sources, library_filename, "newer"):
             if sys.platform == "win32":
-                # A deficiency in typeshed's stubs means we have to type: ignore:
-                pdb = compiler.static_lib_format % (extension_name, ".pdb")  # type: ignore[attr-defined]
+                assert compiler.static_lib_format
+                pdb = compiler.static_lib_format % (extension_name, ".pdb")
                 compile_opts = [f"/Fd{library_dir}\\{pdb}"]
                 compile_opts.extend(extra_compile_args)
             else:
@@ -213,7 +212,7 @@ def compile_c_extension(
         ext_path,
         libraries=cmd.get_libraries(extension),
         extra_postargs=extra_link_args,
-        export_symbols=cmd.get_export_symbols(extension),
+        export_symbols=cmd.get_export_symbols(extension),  # type: ignore[no-untyped-call]
         debug=cmd.debug,
         build_temp=cmd.build_temp,
     )
index 49f783c096f2d2b627bf859ecaee02423d1c66cc..35bceb205e8a9baf3bf288832ebd1460beb1255d 100644 (file)
@@ -4,4 +4,4 @@ mypy==1.5.1
 
 # needed for peg_generator:
 types-psutil==5.9.5.16
-types-setuptools==68.1.0.0
+types-setuptools==68.1.0.1