Skip to content

Commit 0faa0ba

Browse files
authored
pythongh-92584: Remove the distutils package (python#99061)
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 b07f546 commit 0faa0ba

File tree

113 files changed

+26
-22834
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
-22834
lines changed

.gitignore

-2
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

-1
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

+8
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

@@ -401,6 +403,12 @@ although there is currently no date scheduled for their removal.
401403
Removed
402404
=======
403405

406+
* Remove the ``distutils`` package. It was deprecated in Python 3.10 by
407+
:pep:`632` "Deprecate distutils module". For projects still using
408+
``distutils`` and cannot be updated to something else, the ``setuptools``
409+
project can be installed: it still provides ``distutils``.
410+
(Contributed by Victor Stinner in :gh:`92584`.)
411+
404412
* Removed many old deprecated :mod:`unittest` features:
405413

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

Lib/distutils/README

-11
This file was deleted.

Lib/distutils/__init__.py

-20
This file was deleted.

0 commit comments

Comments
 (0)