From 34defd4d420e31e7c4cefe3e44145c6fe8b41eca Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Nov 2021 13:42:18 -0500 Subject: [PATCH] Bind to 'distutils.log' late in case the loader has changed. --- _distutils_hack/__init__.py | 2 +- setuptools/tests/test_test.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index bcac41115e..f707416286 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -49,7 +49,7 @@ def enabled(): def ensure_local_distutils(): clear_distutils() - # ensure the DistutilsMetaFinder is in place and + # With the DistutilsMetaFinder in place, # perform an import to cause distutils to be # loaded from setuptools._distutils. Ref #2906. add_shim() diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index 2d8a7c5d95..08d1329f2b 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -1,5 +1,3 @@ -from distutils import log - import pytest from jaraco import path @@ -13,7 +11,8 @@ def quiet_log(): # Running some of the other tests will automatically # change the log level to info, messing our output. - log.set_verbosity(0) + import distutils.log + distutils.log.set_verbosity(0) @pytest.mark.usefixtures('tmpdir_cwd', 'quiet_log')