Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Gridliner deprecation warning show up #2387

Merged
merged 2 commits into from
Jun 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/cartopy/mpl/gridliner.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

"""

import inspect
import itertools
import operator
import warnings
Expand Down Expand Up @@ -447,10 +448,14 @@ def __init__(self, axes, crs, draw_labels=False, xlocator=None,
if auto_update is None:
auto_update = True
else:
# Note #2394 should be addressed before this deprecation expires.
calling_module = inspect.stack()[1].filename
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 calling_module.endswith('cartopy/mpl/geoaxes.py')
else 2))
self._auto_update = auto_update

def has_labels(self):
Expand Down