diff --git a/ops/charm.py b/ops/charm.py index 472afa20d..edef8db32 100644 --- a/ops/charm.py +++ b/ops/charm.py @@ -364,7 +364,7 @@ def __init__(self, handle: 'Handle'): warnings.warn( 'pre-series-upgrade events will not be emitted from Juju 4.0 onwards', DeprecationWarning, - stacklevel=2, + stacklevel=3, ) super().__init__(handle) @@ -388,7 +388,7 @@ def __init__(self, handle: 'Handle'): warnings.warn( 'post-series-upgrade events will not be emitted from Juju 4.0 onwards', DeprecationWarning, - stacklevel=2, + stacklevel=3, ) super().__init__(handle) @@ -434,7 +434,7 @@ def __init__(self, handle: 'Handle'): 'collect-metrics events will not be emitted from Juju 4.0 onwards - ' 'consider using the Canonical Observability Stack', DeprecationWarning, - stacklevel=2, + stacklevel=3, ) super().__init__(handle)