Skip to content

Commit

Permalink
Make Gridliner deprecation warning show up
Browse files Browse the repository at this point in the history
  • Loading branch information
rcomer committed May 19, 2024
1 parent 6adeeaa commit 80ee125
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/cartopy/mpl/gridliner.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import itertools
import operator
import sys
import warnings

import matplotlib
Expand Down Expand Up @@ -450,7 +451,9 @@ def __init__(self, axes, crs, draw_labels=False, xlocator=None,
warnings.warn(
"The auto_update parameter was deprecated at Cartopy 0.23. In future "
"the gridlines and labels will always be updated.",
DeprecationWarning)
DeprecationWarning,
stacklevel=(3 if sys._getframemodulename(1) == 'cartopy.mpl.geoaxes'
else 2))
self._auto_update = auto_update

def has_labels(self):
Expand Down

0 comments on commit 80ee125

Please sign in to comment.