[Python-checkins] bpo-44781: make distutils test suppress deprecation warning from import distutils (GH-27485)
ambv
webhook-mailer at python.org
Mon Aug 2 05:34:59 EDT 2021
https://github.com/python/cpython/commit/a9134fa2ffb7e4684c980325dd5444afca596586
commit: a9134fa2ffb7e4684c980325dd5444afca596586
branch: main
author: Irit Katriel <1055913+iritkatriel at users.noreply.github.com>
committer: ambv <lukasz at langa.pl>
date: 2021-08-02T11:34:55+02:00
summary:
bpo-44781: make distutils test suppress deprecation warning from import distutils (GH-27485)
files:
M Lib/distutils/tests/test_bdist.py
diff --git a/Lib/distutils/tests/test_bdist.py b/Lib/distutils/tests/test_bdist.py
index 09ad076799b420..55fa3930dd92f2 100644
--- a/Lib/distutils/tests/test_bdist.py
+++ b/Lib/distutils/tests/test_bdist.py
@@ -3,8 +3,11 @@
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,
More information about the Python-checkins
mailing list