8000 bpo-41282: (PEP 632) Deprecate distutils.sysconfig (partial implement… · python/cpython@90d02e5 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 90d02e5

Browse files
bpo-41282: (PEP 632) Deprecate distutils.sysconfig (partial implementation of the PEP) (GH-23142)
This change: * merges `distutils.sysconfig` into `sysconfig` while keeping the original functionality and * marks `distutils.sysconfig` as deprecated https://bugs.python.org/issue41282
1 parent b9ad88b commit 90d02e5

File tree

15 files changed

+212
-446
lines changed

15 files changed

+212
-446
lines changed

Doc/distutils/apiref.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,8 @@ name.
14521452

14531453
.. module:: distutils.sysconfig
14541454
:synopsis: Low-level access to configuration information of the Python interpreter.
1455+
.. deprecated:: 3.10
1456+
:mod:`distutils.sysconfig` has been merged into :mod:`sysconfig`.
14551457
.. moduleauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
14561458
.. moduleauthor:: Greg Ward <gward@python.net>
14571459
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
@@ -1510,6 +1512,9 @@ for other parts of the :mod:`distutils` package.
15101512
meaning for other platforms will vary. The file is a platform-specific text
15111513
file, if it exists. This function is only useful on POSIX platforms.
15121514

1515+
The following functions are deprecated together with this module and they
1516+
have no direct replacement.
1517+
15131518

15141519
.. function:: get_python_inc([plat_specific[, prefix]])
15151520

Doc/library/sysconfig.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ Other functions
224224

225225
Return the path of :file:`Makefile`.
226226

227+
227228
Using :mod:`sysconfig` as a script
228229
----------------------------------
229230

Lib/distutils/extension.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
modules in setup scripts."""
55

66
import os
7+
import re
78
import warnings
89

910
# This class is really only used by the "build_ext" command, so it might
@@ -161,7 +162,7 @@ def read_setup_file(filename):
161162
line = file.readline()
162163
if line is None: # eof
163164
break
164-
if _variable_rx.match(line): # VAR=VALUE, handled in first pass
165+
if re.match(_variable_rx, line): # VAR=VALUE, handled in first pass
165166
continue
166167

167168
if line[0] == line[-1] == "*":

0 commit comments

Comments
 (0)
0