[New-bugs-announce] [issue43426] test_importlib.test_windows emits deprecation warning over usage of distutils

Karthikeyan Singaravelan report at bugs.python.org
Sun Mar 7 00:11:06 EST 2021


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

test_windows uses distutil which emits a deprecation warning due to distutils being deprecated. sysconfig.get_platform and distutils.util.get_host_platform seem to be identical though distutils.util.get_platform has an extra if clause for nt systems. This is related to https://bugs.python.org/issue41282

./python -Wall -m test test_importlib.test_windows
0:00:00 load avg: 0.00 Run tests sequentially
0:00:00 load avg: 0.00 [1/1] test_importlib.test_windows
/root/cpython/Lib/test/test_importlib/test_windows.py:10: 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.util import get_platform
test_importlib.test_windows skipped -- No module named 'winreg'
test_importlib.test_windows skipped

== Tests result: SUCCESS ==

1 test skipped:
    test_importlib.test_windows

Total duration: 56 ms
Tests result: SUCCESS

----------
components: Tests, Windows
messages: 388223
nosy: paul.moore, steve.dower, tim.golden, xtreak, zach.ware
priority: normal
severity: normal
status: open
title: test_importlib.test_windows emits deprecation warning over usage of distutils
type: behavior
versions: Python 3.10

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


More information about the New-bugs-announce mailing list