From d8c46885ad8485b22d3ba54f1c8daf3dc47338ca Mon Sep 17 00:00:00 2001 From: Dima Tisnek Date: Thu, 14 Nov 2024 16:34:55 +0900 Subject: [PATCH] chore: sensible stacklevel on deprecation warnings --- juju/loop.py | 2 +- juju/model.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/juju/loop.py b/juju/loop.py index bed54a11d..d9d2e8f8a 100644 --- a/juju/loop.py +++ b/juju/loop.py @@ -8,5 +8,5 @@ warnings.warn( "juju.loop module is being deprecated by 3.0, use juju.jasyncio instead", DeprecationWarning, - stacklevel=1, + stacklevel=2, ) diff --git a/juju/model.py b/juju/model.py index 207eaf808..12f9edced 100644 --- a/juju/model.py +++ b/juju/model.py @@ -2972,7 +2972,7 @@ async def wait_for_idle( warnings.warn( "wait_for_active is deprecated; use status", DeprecationWarning, - stacklevel=1, + stacklevel=2, ) status = "active"