Skip to content
Snippets Groups Projects
Commit be227c60 authored by kiilerix's avatar kiilerix
Browse files

tests: drop test-demandimport.py distutils test that failed with warnings

The test would fail because warnings:
  /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:18: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
    warnings.warn(
  /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
    warnings.warn("Setuptools is replacing distutils.")

The test for distutils.msvc9compiler comes from 2205d00b6d2b. But since then,
distutils is going away, and this test must change somehow. It is unclear exactly
how setuptools depended on msvc9compiler, but setuptools also moved forward,
and this exact test no longer seems relevant. It thus seems like a fair
solution to remove the test while keeping the demandimport blacklist of
distutils.msvc9compiler.
parent 55677d11
No related branches found
No related tags found
3 merge requests!1041Merge default into stable,!997tests: use shlex.quote instead of pipes.quote,!902Misc newer Python version fixes from Mads
......@@ -31,18 +31,6 @@
except ImportError:
moduletype = types.ModuleType
if os.name != 'nt':
try:
import distutils.msvc9compiler
print(
'distutils.msvc9compiler needs to be an immediate '
'importerror on non-windows platforms'
)
distutils.msvc9compiler
except ImportError:
pass
import re
rsub = re.sub
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment