diff --git a/stdlib/VERSIONS b/stdlib/VERSIONS index 86e8da78677c..f0efb1c08528 100644 --- a/stdlib/VERSIONS +++ b/stdlib/VERSIONS @@ -112,7 +112,7 @@ dbm: 2.7- decimal: 2.7- difflib: 2.7- dis: 2.7- -distutils: 2.7- +distutils: 2.7-3.11 distutils.command.bdist_msi: 2.7-3.10 distutils.command.bdist_wininst: 2.7-3.9 doctest: 2.7- diff --git a/stubs/babel/METADATA.toml b/stubs/babel/METADATA.toml index 7dc2c18b494d..a80fc97a8722 100644 --- a/stubs/babel/METADATA.toml +++ b/stubs/babel/METADATA.toml @@ -1,5 +1,5 @@ version = "2.11.*" -requires = ["types-pytz"] +requires = ["types-pytz", "types-setuptools"] obsolete_since = "2.12.1" # Released on 2023-02-28 partial_stub = true diff --git a/stubs/babel/babel/messages/frontend.pyi b/stubs/babel/babel/messages/frontend.pyi index dfc1a1308aa7..c20579b48e6e 100644 --- a/stubs/babel/babel/messages/frontend.pyi +++ b/stubs/babel/babel/messages/frontend.pyi @@ -1,8 +1,9 @@ import abc from _typeshed import Incomplete -from distutils.cmd import Command as _Command from typing import Any +from setuptools._distutils.cmd import Command as _Command + def listify_value(arg, split: Incomplete | None = None): ... class Command(_Command, metaclass=abc.ABCMeta): diff --git a/stubs/cffi/METADATA.toml b/stubs/cffi/METADATA.toml index e7239b079805..3a9cb22e1ba8 100644 --- a/stubs/cffi/METADATA.toml +++ b/stubs/cffi/METADATA.toml @@ -1,4 +1,5 @@ version = "1.15.*" +requires = ["types-setuptools"] [tool.stubtest] # linux and darwin are mostly equivalent, except for a single `RTLD_DEEPBIND` variable diff --git a/stubs/cffi/cffi/api.pyi b/stubs/cffi/cffi/api.pyi index 770751128e20..85478ce662c0 100644 --- a/stubs/cffi/cffi/api.pyi +++ b/stubs/cffi/cffi/api.pyi @@ -1,4 +1,3 @@ -import distutils.core import sys import types from _typeshed import Incomplete, ReadableBuffer, WriteableBuffer @@ -7,6 +6,7 @@ from typing import Any, TypeVar, overload from typing_extensions import Literal, TypeAlias import _cffi_backend +from setuptools._distutils.extension import Extension _T = TypeVar("_T") @@ -93,7 +93,7 @@ class FFI: def set_source_pkgconfig( self, module_name: str, pkgconfig_libs: list[str], source: str, source_extension: str = ".c", **kwds: Any ) -> None: ... - def distutils_extension(self, tmpdir: str = "build", verbose: bool = True) -> distutils.core.Extension: ... + def distutils_extension(self, tmpdir: str = "build", verbose: bool = True) -> Extension: ... def emit_c_code(self, filename: str) -> None: ... def emit_python_code(self, filename: str) -> None: ... def compile(self, tmpdir: str = ".", verbose: int = 0, target: str | None = None, debug: bool | None = None) -> str: ...