Skip to content

Commit 5334545

Browse files
committed
gh-92584: Remove the distutils package
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
1 parent 1208037 commit 5334545

File tree

113 files changed

+26
-22832
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+26
-22832
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ gmon.out
4141
.DS_Store
4242

4343
*.exe
44-
!Lib/distutils/command/*.exe
4544

4645
# Ignore core dumps... but not Tools/msi/core/ or the like.
4746
core
@@ -58,7 +57,6 @@ Doc/.venv/
5857
Doc/env/
5958
Doc/.env/
6059
Include/pydtrace_probes.h
61-
Lib/distutils/command/*.pdb
6260
Lib/lib2to3/*.pickle
6361
Lib/site-packages/*
6462
!Lib/site-packages/README.txt

Doc/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@
197197
coverage_ignore_modules = [
198198
r'[T|t][k|K]',
199199
r'Tix',
200-
r'distutils.*',
201200
]
202201

203202
coverage_ignore_functions = [

Doc/whatsnew/3.12.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ Important deprecations, removals or restrictions:
7070

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

73+
* :pep:`632`, Remove the ``distutils`` package.
74+
7375
Improved Error Messages
7476
=======================
7577

@@ -385,6 +387,12 @@ although there is currently no date scheduled for their removal.
385387
Removed
386388
=======
387389

390+
* Remove the ``distutils`` package. It was deprecated in Python 3.10 by
391+
:pep:`632` "Deprecate distutils module". For projects still using
392+
``distutils`` and cannot be updated to something else, the ``setuptools``
393+
project can be installed: it still provides ``distutils``.
394+
(Contributed by Victor Stinner in :gh:`92584`.)
395+
388396
* Removed many old deprecated :mod:`unittest` features:
389397

390398
- A number of :class:`~unittest.TestCase` method aliases:

Lib/distutils/README

Lines changed: 0 additions & 11 deletions
This file was deleted.

Lib/distutils/__init__.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)