Skip to content

Commit

Permalink
limit cache size, fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenworsley committed Feb 12, 2024
1 parent a503041 commit f501454
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/iris/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ class IrisSaverFillValueWarning(IrisMaskValueMatchWarning, IrisSaveWarning):
pass


@lru_cache(None)
@lru_cache(128)
def warn_once(msg, stacklevel, frame, **kwargs):
"""Raise a warning only if a similar one has not been raised before."""
warnings.warn(msg, stacklevel=stacklevel, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/fileformats/_nc_load_rules/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def _get_ellipsoid(cf_grid_var):
"applied. To apply the datum when loading, use the "
"iris.FUTURE.datum_support flag."
)
iris.exceptions.warn_once_at_level(wmsg, FutureWarning, category=FutureWarning, stacklevel=14)
iris.exceptions.warn_once_at_level(wmsg, category=FutureWarning, stacklevel=14)
datum = None

if datum is not None:
Expand Down

0 comments on commit f501454

Please sign in to comment.