From d32e4176fee50df62d6d42599a3049eb63d828bd Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 8 Aug 2022 23:08:22 +0200 Subject: [PATCH] Suppress LegacyVersion deprecation @ pytest (cherry picked from commit 7bf5fa48786b86efc55813aef40445db1da43c56) --- tests/test_circular_imports.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_circular_imports.py b/tests/test_circular_imports.py index ba7d46ed21e..d75180ad30c 100644 --- a/tests/test_circular_imports.py +++ b/tests/test_circular_imports.py @@ -80,6 +80,10 @@ def test_no_warnings(import_path: str) -> None: # https://github.com/benoitc/gunicorn/issues/2840 for detail. "-W", "ignore:module 'sre_constants' is " "deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", + # Also caused by `gunicorn.util` importing `pkg_resources`: + "-W", "ignore:Creating a LegacyVersion has been deprecated and " + "will be removed in the next major release:" + "DeprecationWarning:", "-c", f"import {import_path!s}", # fmt: on )