From 897ede17de744754799f70be582fc6266548a9e7 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Thu, 23 Feb 2023 18:09:18 +0000 Subject: [PATCH] Remove a default value in `distutils` Fixes #9799. Stubtest started failing on our `setuptools` stubs because of a default value added to our stdlib `distutils` stubs. The reason for this is because our `setuptools` stubs erroneously claim here that the `setuptools._distutils.core.Distribution` class is the same as the stdlib `distutils.dist.Distribution` class: https://github.com/python/typeshed/blob/06755e10ba0d39e7e4c18fcc2663d9da564a71ad/stubs/setuptools/setuptools/_distutils/core.pyi#L3 In actual fact, they're not, and they have different default values for this parameter. But reverting the addition of the default value is the simplest short-term fix for now. (An alternative fix would be to just merge #9795.) --- stdlib/distutils/dist.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/distutils/dist.pyi b/stdlib/distutils/dist.pyi index 4641636fe483..dfffdc5e11bb 100644 --- a/stdlib/distutils/dist.pyi +++ b/stdlib/distutils/dist.pyi @@ -103,7 +103,7 @@ class Distribution: def get_command_packages(self): ... def get_command_class(self, command): ... def reinitialize_command(self, command, reinit_subcommands: int = 0): ... - def announce(self, msg, level=2) -> None: ... + def announce(self, msg, level: int = ...) -> None: ... def run_commands(self) -> None: ... def run_command(self, command) -> None: ... def has_pure_modules(self): ...