From 2aa49424ff46a1e388514e8f91dca3b6b7b8b6fe Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Thu, 1 Aug 2024 09:25:45 -0400 Subject: [PATCH] Ignore TripleDES python-cryptography import warnings TripleDES will be deprecated in python-cryptography 48.0.0. We have code that uses it if it is available and otherwise ignores it. Because this gets imports in constants.py this warning is promiment pretty much everywhere. So let's ignore it since we already handle the issue. Related: https://pagure.io/freeipa/issue/9641 Signed-off-by: Rob Crittenden Reviewed-By: Alexander Bokovoy --- ipalib/constants.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ipalib/constants.py b/ipalib/constants.py index cb4889393..b657e5a90 100644 --- a/ipalib/constants.py +++ b/ipalib/constants.py @@ -25,6 +25,14 @@ All constants centralised in one file. import os import string import uuid +import warnings + +warnings.filterwarnings( + "ignore", + "TripleDES has been moved to " + "cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and " + "will be removed from this module in 48.0.0", + category=UserWarning) from ipaplatform.constants import constants as _constants from ipapython.dn import DN