From f5c85dfa2890acdb40ca3f2e6fbf5b4003b45944 Mon Sep 17 00:00:00 2001 From: Debian Python Team Date: Fri, 7 Oct 2022 13:26:54 +0100 Subject: [PATCH] _run_tests__silence_distutils_deprecation_warning # HG changeset patch # User Julien Cristau # Date 1649431378 -7200 # Fri Apr 08 17:22:58 2022 +0200 # Node ID 96cc0ab5e1e68e4e163e8933842f908dcf42897a # Parent ff73927e33968c053bc245884deddb78f5fb6212 run-tests: silence distutils deprecation warning Gbp-Pq: Topic py310 Gbp-Pq: Name 2_run_tests__silence_distutils_deprecation_warning.patch --- tests/run-tests.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/run-tests.py b/tests/run-tests.py index ed4bcaf..0227e08 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -48,7 +48,6 @@ import argparse import collections import contextlib import difflib -import distutils.version as version import errno import functools import json @@ -70,8 +69,13 @@ import threading import time import unittest import uuid +import warnings import xml.dom.minidom as minidom +warnings.filterwarnings("ignore", "The distutils package is deprecated", DeprecationWarning) + +import distutils.version as version + if sys.version_info < (3, 5, 0): print( '%s is only supported on Python 3.5+, not %s' -- 2.30.2