diff --git a/juju/application.py b/juju/application.py index 0480e38f2..4502d30b5 100644 --- a/juju/application.py +++ b/juju/application.py @@ -4,7 +4,6 @@ import hashlib import json import logging -import warnings from typing import Dict, List, Union from pathlib import Path @@ -36,8 +35,8 @@ def exposed(self) -> bool: return self.safe_data["exposed"] @property + @deprecated("Application.owner_tag is deprecated and will be removed in v4") def owner_tag(self) -> str: - warnings.warn("Deprecated", DeprecationWarning) return self.safe_data["owner-tag"] @property @@ -45,7 +44,7 @@ def life(self) -> str: return self.safe_data["life"] @property - @deprecated("Deprecated ---------------------") + @deprecated("Application.min_units is deprecated and will be removed in v4") def min_units(self) -> int: return self.safe_data["min-units"] @@ -54,13 +53,13 @@ def constraints(self) -> Dict[str, Union[str, int, bool]]: return self.safe_data["constraints"] @property + @deprecated("Application.subordinate is deprecated and will be removed in v4") def subordinate(self) -> bool: - warnings.warn("Deprecated", DeprecationWarning) return self.safe_data["subordinate"] @property + @deprecated("Application.workload_version is deprecated and will be removed in v4, use Unit.workload_version instead.") def workload_version(self) -> str: - warnings.warn("Deprecated, use Unit.workload_version instead", DeprecationWarning) return self.safe_data["workload-version"] @property