From 722e1fd0e50ad69fbdd4d0373fc5bd4d75a1d845 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sun, 13 Mar 2022 20:55:27 +0000 Subject: [PATCH 1/4] [Docs] Improve documentation about migration from distutils --- docs/deprecated/distutils-legacy.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/deprecated/distutils-legacy.rst b/docs/deprecated/distutils-legacy.rst index 148dc25932..cdc4e39b89 100644 --- a/docs/deprecated/distutils-legacy.rst +++ b/docs/deprecated/distutils-legacy.rst @@ -3,11 +3,10 @@ Porting from Distutils Setuptools and the PyPA have a `stated goal `_ to make Setuptools the reference API for distutils. -Since the 49.1.2 release, Setuptools includes a local, vendored copy of distutils (from late copies of CPython) that is disabled by default. To enable the use of this copy of distutils when invoking setuptools, set the enviroment variable: +Since the 49.1.2 release, Setuptools includes a local, vendored copy of distutils (from late copies of CPython) that is enabled by default. To disable the use of this copy of distutils when invoking setuptools, set the enviroment variable: - SETUPTOOLS_USE_DISTUTILS=local + SETUPTOOLS_USE_DISTUTILS=stdlib -This behavior is planned to become the default. Prefer Setuptools ----------------- @@ -20,12 +19,15 @@ As Distutils is deprecated, any usage of functions or objects from distutils is ``distutils.command.{build_clib,build_ext,build_py,sdist}`` → ``setuptools.command.*`` -``distutils.log`` → (no replacement yet) +``distutils.log`` → :mod:`logging` (standard library) ``distutils.version.*`` → ``packaging.version.*`` ``distutils.errors.*`` → ``setuptools.errors.*`` [#errors]_ + +Migration is also provided by :pep:`632#migration-advice`. + If a project relies on uses of ``distutils`` that do not have a suitable replacement above, please search the `Setuptools issue tracker `_ and file a request, describing the use-case so that Setuptools' maintainers can investigate. Please provide enough detail to help the maintainers understand how distutils is used, what value it provides, and why that behavior should be supported. From c522737c9488472d30ced2a11739e607a6f8ddff Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sun, 13 Mar 2022 21:00:22 +0000 Subject: [PATCH 2/4] Fix version of setuptools for default local distutils --- docs/deprecated/distutils-legacy.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deprecated/distutils-legacy.rst b/docs/deprecated/distutils-legacy.rst index cdc4e39b89..f600c52bc2 100644 --- a/docs/deprecated/distutils-legacy.rst +++ b/docs/deprecated/distutils-legacy.rst @@ -3,7 +3,7 @@ Porting from Distutils Setuptools and the PyPA have a `stated goal `_ to make Setuptools the reference API for distutils. -Since the 49.1.2 release, Setuptools includes a local, vendored copy of distutils (from late copies of CPython) that is enabled by default. To disable the use of this copy of distutils when invoking setuptools, set the enviroment variable: +Since the 60.0.0 release, Setuptools includes a local, vendored copy of distutils (from late copies of CPython) that is enabled by default. To disable the use of this copy of distutils when invoking setuptools, set the enviroment variable: SETUPTOOLS_USE_DISTUTILS=stdlib From 82141a2e22141cefe93f8b686ee7489ad7461a71 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sun, 13 Mar 2022 21:04:12 +0000 Subject: [PATCH 3/4] Fix PEP 632 link display --- docs/deprecated/distutils-legacy.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deprecated/distutils-legacy.rst b/docs/deprecated/distutils-legacy.rst index f600c52bc2..9987013a25 100644 --- a/docs/deprecated/distutils-legacy.rst +++ b/docs/deprecated/distutils-legacy.rst @@ -26,7 +26,7 @@ As Distutils is deprecated, any usage of functions or objects from distutils is ``distutils.errors.*`` → ``setuptools.errors.*`` [#errors]_ -Migration is also provided by :pep:`632#migration-advice`. +Migration is also provided by :pep:`PEP 632 <632#migration-advice>`. If a project relies on uses of ``distutils`` that do not have a suitable replacement above, please search the `Setuptools issue tracker `_ and file a request, describing the use-case so that Setuptools' maintainers can investigate. Please provide enough detail to help the maintainers understand how distutils is used, what value it provides, and why that behavior should be supported. From 19609c020dc01146658d80a9ba13ce4369f6c483 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sun, 13 Mar 2022 21:15:00 +0000 Subject: [PATCH 4/4] Link packaging --- docs/conf.py | 1 + docs/deprecated/distutils-legacy.rst | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index da4d9f33d5..4c00d46fdb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -200,6 +200,7 @@ intersphinx_mapping['pip'] = 'https://pip.pypa.io/en/latest', None intersphinx_mapping['PyPUG'] = ('https://packaging.python.org/en/latest/', None) +intersphinx_mapping['packaging'] = ('https://packaging.pypa.io/en/latest/', None) intersphinx_mapping['importlib-resources'] = ( 'https://importlib-resources.readthedocs.io/en/latest', None ) diff --git a/docs/deprecated/distutils-legacy.rst b/docs/deprecated/distutils-legacy.rst index 9987013a25..e73cdff5a6 100644 --- a/docs/deprecated/distutils-legacy.rst +++ b/docs/deprecated/distutils-legacy.rst @@ -21,12 +21,12 @@ As Distutils is deprecated, any usage of functions or objects from distutils is ``distutils.log`` → :mod:`logging` (standard library) -``distutils.version.*`` → ``packaging.version.*`` +``distutils.version.*`` → :doc:`packaging.version.* ` ``distutils.errors.*`` → ``setuptools.errors.*`` [#errors]_ -Migration is also provided by :pep:`PEP 632 <632#migration-advice>`. +Migration advice is also provided by :pep:`PEP 632 <632#migration-advice>`. If a project relies on uses of ``distutils`` that do not have a suitable replacement above, please search the `Setuptools issue tracker `_ and file a request, describing the use-case so that Setuptools' maintainers can investigate. Please provide enough detail to help the maintainers understand how distutils is used, what value it provides, and why that behavior should be supported.