Skip to content

Commit 0aaf3fa

Browse files
authored
Merge pull request #202 from csiro-coasts/drop-deprecated-code
Drop old deprecated code
2 parents d3ec547 + 5a03ce5 commit 0aaf3fa

File tree

11 files changed

+10
-406
lines changed

11 files changed

+10
-406
lines changed

docs/releases/development.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,13 @@ Next release (in development)
88
* Add support for Python 3.14 and drop support for Python 3.11,
99
following `SPEC-0 <https://scientific-python.org/specs/spec-0000/>`_.
1010
(:pr:`201`).
11+
* Drop all previously deprecated functionality:
12+
support for shapely versions older than 2.0,
13+
support for cartopy versions older than 0.23.0,
14+
the ``emsarray.Format`` and ``emsarray.get_file_format()`` aliases,
15+
the renamed Convention methods ``_get_data_array()``,
16+
``get_time_name()``, ``get_depth_name()``, ``get_all_depth_names()``,
17+
``unravel_index()``, ``make_linear()``, ``make_patch_collection()``,
18+
``spatial_index()``, ``get_grid_kind_and_size()``,
19+
and ``NonIntersectingPoints.indices``
20+
(:pr:`202`).

src/emsarray/__init__.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
emsarray - xarray utilities for various non-CF grid data conventions
33
"""
44
import importlib.metadata
5-
import warnings
6-
from typing import Any
75

86
from . import tutorial
97
from .accessors import ems_accessor
@@ -16,20 +14,3 @@
1614
"ems_accessor",
1715
"Convention", "get_dataset_convention", "open_dataset",
1816
]
19-
20-
21-
def __getattr__(name: str) -> Any:
22-
old_new = {
23-
'Format': ('Convention', 'emsarray.formats.Format'),
24-
'get_file_format': ('get_dataset_convention', 'emsarray.formats.get_file_format'),
25-
}
26-
if name in old_new:
27-
new, old_path = old_new[name]
28-
warnings.warn(
29-
f"emsarray.{name} has been renamed to emsarray.{new}",
30-
category=DeprecationWarning,
31-
stacklevel=2)
32-
old_module, old_name = old_path.rsplit('.', 1)
33-
return getattr(importlib.import_module(old_module), old_name)
34-
35-
raise AttributeError(f"{name} is not defined")

src/emsarray/compat/__init__.py

Whitespace-only changes.

src/emsarray/compat/shapely.py

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)