mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
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
This commit is contained in:
parent
b9ad88be03
commit
90d02e5e63
15 changed files with 209 additions and 443 deletions
|
@ -2,6 +2,7 @@
|
|||
import unittest
|
||||
import os
|
||||
import sys
|
||||
import sysconfig
|
||||
from test.support import run_unittest, missing_compiler_executable
|
||||
|
||||
from distutils.command.config import dump_file, config
|
||||
|
@ -21,9 +22,12 @@ class ConfigTestCase(support.LoggingSilencer,
|
|||
self._logs = []
|
||||
self.old_log = log.info
|
||||
log.info = self._info
|
||||
self.old_config_vars = dict(sysconfig._CONFIG_VARS)
|
||||
|
||||
def tearDown(self):
|
||||
log.info = self.old_log
|
||||
sysconfig._CONFIG_VARS.clear()
|
||||
sysconfig._CONFIG_VARS.update(self.old_config_vars)
|
||||
super(ConfigTestCase, self).tearDown()
|
||||
|
||||
def test_dump_file(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue