Skip to content

Commit

Permalink
gh-92584: Remove the distutils package (#99061)
Browse files Browse the repository at this point in the history
Remove the distutils package. It was deprecated in Python 3.10 by PEP
632 "Deprecate distutils module". For projects still using distutils
and cannot be updated to something else, the setuptools project can
be installed: it still provides distutils.

* Remove Lib/distutils/ directory
* Remove test_distutils
* Remove references to distutils
* Skip test_check_c_globals and test_peg_generator since they use
  distutils
  • Loading branch information
vstinner authored Nov 3, 2022
1 parent b07f546 commit 0faa0ba
Show file tree
Hide file tree
Showing 113 changed files with 26 additions and 22,834 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ gmon.out
.DS_Store

*.exe
!Lib/distutils/command/*.exe

# Ignore core dumps... but not Tools/msi/core/ or the like.
core
Expand All @@ -58,7 +57,6 @@ Doc/.venv/
Doc/env/
Doc/.env/
Include/pydtrace_probes.h
Lib/distutils/command/*.pdb
Lib/lib2to3/*.pickle
Lib/site-packages/*
!Lib/site-packages/README.txt
Expand Down
1 change: 0 additions & 1 deletion Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@
coverage_ignore_modules = [
r'[T|t][k|K]',
r'Tix',
r'distutils.*',
]

coverage_ignore_functions = [
Expand Down
8 changes: 8 additions & 0 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ Important deprecations, removals or restrictions:

* :pep:`623`, Remove wstr from Unicode

* :pep:`632`, Remove the ``distutils`` package.

Improved Error Messages
=======================

Expand Down Expand Up @@ -401,6 +403,12 @@ although there is currently no date scheduled for their removal.
Removed
=======

* Remove the ``distutils`` package. It was deprecated in Python 3.10 by
:pep:`632` "Deprecate distutils module". For projects still using
``distutils`` and cannot be updated to something else, the ``setuptools``
project can be installed: it still provides ``distutils``.
(Contributed by Victor Stinner in :gh:`92584`.)

* Removed many old deprecated :mod:`unittest` features:

- A number of :class:`~unittest.TestCase` method aliases:
Expand Down
11 changes: 0 additions & 11 deletions Lib/distutils/README

This file was deleted.

20 changes: 0 additions & 20 deletions Lib/distutils/__init__.py

This file was deleted.

Loading

0 comments on commit 0faa0ba

Please sign in to comment.