From 48f4800ec625e941d33751d45c5ce8bdbad94c30 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 29 Jun 2024 17:37:17 +0200 Subject: [PATCH] Fix deprecation warning (#14091) Co-authored-by: UltralyticsAssistant --- ultralytics/utils/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ultralytics/utils/__init__.py b/ultralytics/utils/__init__.py index b932055102..5c1d314cfb 100644 --- a/ultralytics/utils/__init__.py +++ b/ultralytics/utils/__init__.py @@ -1026,13 +1026,10 @@ class SettingsManager(dict): self.save() -def deprecation_warn(arg, new_arg, version=None): +def deprecation_warn(arg, new_arg): """Issue a deprecation warning when a deprecated argument is used, suggesting an updated argument.""" - if not version: - version = float(__version__[:3]) + 0.2 # deprecate after 2nd major release LOGGER.warning( - f"WARNING ⚠️ '{arg}' is deprecated and will be removed in 'ultralytics {version}' in the future. " - f"Please use '{new_arg}' instead." + f"WARNING ⚠️ '{arg}' is deprecated and will be removed in in the future. " f"Please use '{new_arg}' instead." )