From 244ff89060b9950fe04c57efd427e9f02ebca85a Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 4 Mar 2025 15:19:39 +0000 Subject: [PATCH] tests: Filter out eventlet deprecation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are *super* annoying (and useless to boot, since there is nothing we can do about them in the near term). Shut them ⬇️⬇️⬇️ down ⬇️⬇️⬇️. Change-Id: I469dafa243b95749b34503c1f3e905d9d8c780d4 Signed-off-by: Stephen Finucane --- nova/tests/fixtures/nova.py | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/nova/tests/fixtures/nova.py b/nova/tests/fixtures/nova.py index d33294cfa0..8ea24f7890 100644 --- a/nova/tests/fixtures/nova.py +++ b/nova/tests/fixtures/nova.py @@ -838,6 +838,53 @@ class WarningsFixture(fixtures.Fixture): category=UserWarning, ) + # NOTE(stephenfin): Ignore deprecation warnings related to eventlet: we + # know it needs to go, there's no point having our unit tests + # continuously shout about it + warnings.filterwarnings( + 'ignore', + message=( + "Using class 'GreenThreadPoolExecutor' \\(either directly or " + "via inheritance\\) is deprecated: Eventlet support is " + "deprecated. Please migrate your code and stop using Green " + "executor." + ), + category=DeprecationWarning, + ) + warnings.filterwarnings( + 'ignore', + message=( + "Using class 'GreenFuture' \\(either directly or " + "via inheritance\\) is deprecated: Eventlet support is " + "deprecated. Please migrate your code and stop using Green " + "future." + ), + category=DeprecationWarning, + ) + warnings.filterwarnings( + 'ignore', + message='Eventlet support is deprecated and will be removed.', + category=DeprecationWarning, + ) + warnings.filterwarnings( + 'ignore', + message=( + "Using the 'executor' argument is deprecated: the eventlet " + "executor is now deprecated. Threading will be the only " + "execution model available." + ), + category=DeprecationWarning, + ) + warnings.filterwarnings( + 'ignore', + message=( + "Eventlet usages are deprecated and the removal of Eventlet " + "from OpenStack is planned, for this reason the Eventlet " + "executor is deprecated." + ), + category=DeprecationWarning, + ) + # NOTE(gibi): The UUIDFields emits a warning if the value is not a # valid UUID. Let's escalate that to an exception in the test to # prevent adding violations.