From f6090455914e2010291f3d43e3cb44b01ebfa66a Mon Sep 17 00:00:00 2001 From: Thomas Grimonet Date: Tue, 6 Aug 2024 09:34:25 +0000 Subject: [PATCH] fix: Suppress deprecation warning from Cryptography in asyncssh --- anta/__init__.py | 8 ++++++++ pyproject.toml | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/anta/__init__.py b/anta/__init__.py index 666084312..2f8872dc4 100644 --- a/anta/__init__.py +++ b/anta/__init__.py @@ -5,6 +5,14 @@ import importlib.metadata import os +import warnings + +from cryptography.utils import CryptographyDeprecationWarning + +# Suppress deprecation messages from Crypto - See Issue 674 in asyncssh +# https://github.com/ronf/asyncssh/issues/674 +warnings.filterwarnings("ignore", category=CryptographyDeprecationWarning) + __version__ = f"v{importlib.metadata.version('anta')}" __credits__ = [ diff --git a/pyproject.toml b/pyproject.toml index f1714aa8d..4c0b9a438 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,6 @@ dependencies = [ "requests>=2.31.0", "rich>=13.5.2,<14", "httpx>=0.27.0", - "cryptography<43.0.0", ] keywords = [ "test",