]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-135374: Adjust test for setuptools' replacement of distutils (GH-138796)
authorPetr Viktorin <encukou@gmail.com>
Wed, 24 Sep 2025 13:41:24 +0000 (15:41 +0200)
committerGitHub <noreply@github.com>
Wed, 24 Sep 2025 13:41:24 +0000 (15:41 +0200)
commit987af36a717793e97aad57f7da36a0677edfbdbd
tree2558ecffaba8eefd113f89bb09599a5ba09f715f
parent262aa73bd7d951775b4a4abb072640ddb97cb280
[3.11] gh-135374: Adjust test for setuptools' replacement of distutils (GH-138796)

ensurepip installs a bundled copy of distutils, which overrides
the stdlib module. This affects several tests. This commit:

- skips distutils in test___all__, as we're unlikely to break
  `__all__` in a security-fix-only branch (and if we do it's not
  much of a a big deal)
- skips importability tests of distutils submodules if the
  setuptools hack is detected

Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Lib/test/test___all__.py
Lib/test/test_sundry.py