[New-bugs-announce] [issue43425] test_peg_generator.test_c_parser emits DeprecationWarning due to distutils

Karthikeyan Singaravelan report at bugs.python.org
Sun Mar 7 00:07:09 EST 2021


New submission from Karthikeyan Singaravelan <tir.karthi at gmail.com>:

distutils was deprecated for removal in Python 3.10. It is used in test_peg_generator.test_c_parser which emits a deprecation warning. It also seems to be used in test_support for missing_compiler_executable that will emit a deprecation warning.

./python -Wall -m test test_peg_generator test_c_parser
0:00:00 load avg: 0.02 Run tests sequentially
0:00:00 load avg: 0.02 [1/2] test_peg_generator
/root/cpython/Lib/test/test_peg_generator/test_c_parser.py:4: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.tests.support import TempdirManager


Other places on grep : 

rg 'from distutils' | rg -v 'Lib/distutils|rst'   
Modules/_decimal/tests/formathelper.py:from distutils.spawn import find_executable
Doc/includes/setup.py:from distutils.core import setup, Extension
Doc/includes/test.py:from distutils.util import get_platform
setup.py:from distutils import log
setup.py:from distutils.command.build_ext import build_ext
setup.py:from distutils.command.build_scripts import build_scripts
setup.py:from distutils.command.install import install
setup.py:from distutils.command.install_lib import install_lib
setup.py:from distutils.core import Extension, setup
setup.py:from distutils.errors import CCompilerError, DistutilsError
setup.py:from distutils.spawn import find_executable
Lib/_osx_support.py:        from distutils import log
Lib/_osx_support.py:    Currently called from distutils.sysconfig
Lib/test/support/__init__.py:    from distutils import ccompiler, sysconfig, spawn, errors
Lib/test/test_importlib/test_windows.py:from distutils.util import get_platform
Lib/test/test_peg_generator/test_c_parser.py:from distutils.tests.support import TempdirManager
Tools/peg_generator/pegen/build.py:    from distutils.core import Distribution, Extension
Tools/peg_generator/pegen/build.py:    from distutils.command.clean import clean  # type: ignore
Tools/peg_generator/pegen/build.py:    from distutils.command.build_ext import build_ext  # type: ignore
Tools/peg_generator/pegen/build.py:    from distutils.tests.support import fixup_build_ext  # type: ignore
Tools/test2to3/setup.py:from distutils.core import setup
Tools/test2to3/setup.py:    from distutils.command.build_py import build_py_2to3 as build_py
Tools/test2to3/setup.py:    from distutils.command.build_py import build_py
Tools/test2to3/setup.py:    from distutils.command.build_scripts import build_scripts_2to3 as build_scripts
Tools/test2to3/setup.py:    from distutils.command.build_scripts import build_scripts
Tools/test2to3/test/runtests.py:    from distutils.util import copydir_run_2to3
Misc/HISTORY:- Issue #5394: removed > 2.3 syntax from distutils.msvc9compiler.

----------
components: Tests
messages: 388222
nosy: pablogsal, xtreak
priority: normal
severity: normal
status: open
title: test_peg_generator.test_c_parser emits DeprecationWarning due to distutils
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43425>
_______________________________________


More information about the New-bugs-announce mailing list