From 9dc6c0c5c8060529e1ee92b7f64d1a9835dfaf70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Wed, 15 May 2024 08:36:38 +0900
Subject: [PATCH] patches/diff: emit DeprecationWarning only once

---
 product/ERP5Type/patches/diff.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/product/ERP5Type/patches/diff.py b/product/ERP5Type/patches/diff.py
index 655af50954..bd0c757015 100644
--- a/product/ERP5Type/patches/diff.py
+++ b/product/ERP5Type/patches/diff.py
@@ -31,13 +31,9 @@ from collections import Mapping
 from collections import Iterable
 try:
   from deepdiff import DeepDiff
-except ImportError:
-  DeepDiff = None
-  warnings.warn("Please install deepdiff, it is needed by json_representable mixin",
-                DeprecationWarning)
-try:
   from deepdiff.helper import strings, numbers
 except ImportError:
+  DeepDiff = None
   strings = None
   numbers = None
   warnings.warn("Please install deepdiff, it is needed by json_representable mixin",
-- 
2.30.9