From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 2 Aug 2021 09:54:52 +0000 (-0700) Subject: bpo-44781: make distutils test suppress deprecation warning from import distutils... X-Git-Tag: v3.10.0rc1~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1bc83eb5c8040855de425c68fc9c5d3c5b48d38e;p=thirdparty%2FPython%2Fcpython.git bpo-44781: make distutils test suppress deprecation warning from import distutils (GH-27485) (GH-27540) (cherry picked from commit a9134fa2ffb7e4684c980325dd5444afca596586) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> --- diff --git a/Lib/distutils/tests/test_bdist.py b/Lib/distutils/tests/test_bdist.py index 09ad076799b4..55fa3930dd92 100644 --- a/Lib/distutils/tests/test_bdist.py +++ b/Lib/distutils/tests/test_bdist.py @@ -3,8 +3,11 @@ import os import unittest from test.support import run_unittest -from distutils.command.bdist import bdist -from distutils.tests import support +import warnings +with warnings.catch_warnings(): + warnings.simplefilter('ignore', DeprecationWarning) + from distutils.command.bdist import bdist + from distutils.tests import support class BuildTestCase(support.TempdirManager,