*#2143:SetuptoolsadoptsdistutilsfromthePython3.9standardlibraryandnolongerdependsondistutilsinthestandardlibrary.Whenimporting``setuptools``or``setuptools.distutils_patch``,Setuptoolswillexposeitsbundledversionasatop-level``distutils``package(andunloadanypreviously-importedtop-leveldistutilspackage),retainingtheexpectationthat``distutils``' objects are actually Setuptools objects. Although this change is not expected to break any use cases, it will likely affect tool chains that are monkey-patching distutils or relying on Setuptools'ownmonkey-patchingofdistutils.
*#2143:SetuptoolsadoptsdistutilsfromthePython3.9standardlibraryandnolongerdependsondistutilsinthestandardlibrary.Whenimporting``setuptools``or``setuptools.distutils_patch``,Setuptoolswillexposeitsbundledversionasatop-level``distutils``package(andunloadanypreviously-importedtop-leveldistutilspackage),retainingtheexpectationthat``distutils``' objects are actually Setuptools objects.
To avoid getting any legacy behavior from the standard library, projects are advised to always "import setuptools" prior to importing anything from distutils. This behavior happens by default when using ``pip install`` or ``pep517.build``. Workflows that rely on ``setup.py (anything)`` will need to first ensure setuptools is imported. One way to achieve this behavior without modifying code is to invoke Python thus: ``python -c "import setuptools; exec(open('setup.py').read())" (anything)``.