On 10/05/2022 09.53, Victor Stinner wrote:
Hi,
Two years ago, PEP 632 "Deprecate distutils module" was accepted: the
distutils package was deprecated in Python 3.10 and scheduled for
removal in Python 3.12. Questions.
* Is the Python ecosystem ready for the distutils removal? How many
projects are expected to be broken by this removal?
* Is setuptools a drop-in replacement of distutils for most cases? Are
there tools and documentation explaining how to replace distutils with
setuptools?
* Is there a tool to migrate from setup.py (distutils) to
pyproject.toml (setuptools)? The dephell project can convert a
setup.py script to pyproject.toml using poetry as the build system.
* Can we simply suggest installing setuptools to users who still use
"import distutils"? setuptools now provides the a "distutils" package.
* Should we keep distutils in Python stdlib a few more Python releases
if the removal causes too many practical issues?
Setuptools now provides _distutils_hack meta importer that injects a
facade distutils package. "from distutils import setup" will keep
working with modern setuptools.
Right now, Python still uses distutils internally for multiple use
cases. I propose to start with renaming the distutils package to
_distutils in the stdlib:
* https://github.com/python/cpython/issues/92584
* https://github.com/python/cpython/pull/92585
Erlend and I got most extension modules ported to autoconf and
Modules/Setup.stdlib. The remaining modules should be done in a couple
of weeks. I recommend that we do not rename distutils and instead remove
it entirely.
Christian
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/FYRFMWETDJXU3SRAOTZJIQRN6QDLAMXT/
Code of Conduct: http://python.org/psf/codeofconduct/