[issue41282] Deprecate and remove distutils
Paul Ganssle
report at bugs.python.org
Tue Jul 14 14:03:33 EDT 2020
Paul Ganssle <p.ganssle at gmail.com> added the comment:
> I don't think it's a good idea to replace bad habits from distutils with bad habits in setuptools._distutils. And this is exactly what you get with pointing directly to setuptools.
These are two different questions. We're not asking people to migrate to `setuptools._distutils` (a private module which may not continue to exist in that location), `setuptools` is *adopting* `distutils`, such that `distutils` is a project provided by `pip install distutils` (mind you, this is happening independent of what the standard library does — the only question is whether `import distutils` continues to work if you don't have `setuptools` installed).
> While splitting out distutils to a separate package in a Linux distro, I found some creative usages at runtime of a package (see my lightning talk at the language summit 2018, and [1]). From my point of view, CPython should provide documentation how to forward-port these issues without using setuptools._distutils.
At this point, the extent of CPython's documentation on this should probably be, "We are removing `distutils` and moving it into the `setuptools` namespace. In future versions, you will need to install `setuptools` to import the `distutils` package." `setuptools` should almost certainly deprecate `distutils` and probably remove large swathes of it in the process, but that's probably on a case-by-case basis, and it's a separate issue from what needs to happen in CPython.
> Currently setuptools only has one component (pkg_resources, [2]) which is used at runtime. I dislike it if more than that is used at runtime of a package.
I don't think anyone is planning to recommend the use of *any* `setuptools`-provided packages at runtime, including `pkg_resources`. This move is actually a good one from that point of view, because it will require that projects using `distutils` declare a *runtime* dependency on `setuptools`, which will, hopefully, raise some eyebrows. Better than the current situation, where these dependencies are totally undeclared (though probably worse than if `setuptools`, `pkg_resources` and `distutils` were all separate PyPI packages).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41282>
_______________________________________
More information about the Python-bugs-list
mailing list