Skip to content

Commit d8c4688

Browse files
committed
chore: sensible stacklevel on deprecation warnings
1 parent e3cecc3 commit d8c4688

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

juju/loop.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
warnings.warn(
99
"juju.loop module is being deprecated by 3.0, use juju.jasyncio instead",
1010
DeprecationWarning,
11-
stacklevel=1,
11+
stacklevel=2,
1212
)

juju/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2972,7 +2972,7 @@ async def wait_for_idle(
29722972
warnings.warn(
29732973
"wait_for_active is deprecated; use status",
29742974
DeprecationWarning,
2975-
stacklevel=1,
2975+
stacklevel=2,
29762976
)
29772977
status = "active"
29782978

0 commit comments

Comments
 (0)