diff options
author | Alex Waygood <Alex.Waygood@Gmail.com> | 2023-08-31 07:41:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-31 07:41:25 (GMT) |
commit | b89b838ebc817e5fbffad1ad8e1a85aa2d9f3113 (patch) | |
tree | f4425f8db56429b0ead0653d4e18a4422a5568f7 | |
parent | 991e4e76b54b69f227242e73c2ec9d62f903da53 (diff) | |
download | cpython-b89b838ebc817e5fbffad1ad8e1a85aa2d9f3113.zip cpython-b89b838ebc817e5fbffad1ad8e1a85aa2d9f3113.tar.gz cpython-b89b838ebc817e5fbffad1ad8e1a85aa2d9f3113.tar.bz2 |
gh-108455: peg_generator: use `types-setuptools==68.1.0.1` in CI (#108697)
-rw-r--r-- | Tools/peg_generator/mypy.ini | 5 | ||||
-rw-r--r-- | Tools/peg_generator/pegen/build.py | 9 | ||||
-rw-r--r-- | Tools/requirements-dev.txt | 2 |
3 files changed, 5 insertions, 11 deletions
diff --git a/Tools/peg_generator/mypy.ini b/Tools/peg_generator/mypy.ini index 55429dd..8820d77 100644 --- a/Tools/peg_generator/mypy.ini +++ b/Tools/peg_generator/mypy.ini @@ -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 diff --git a/Tools/peg_generator/pegen/build.py b/Tools/peg_generator/pegen/build.py index 998cd41..6b04ae9 100644 --- a/Tools/peg_generator/pegen/build.py +++ b/Tools/peg_generator/pegen/build.py @@ -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, ) diff --git a/Tools/requirements-dev.txt b/Tools/requirements-dev.txt index 49f783c..35bceb2 100644 --- a/Tools/requirements-dev.txt +++ b/Tools/requirements-dev.txt @@ -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 |