Skip to content

Commit fbc1740

Browse files
finalize make modules private (#234)
* finalize make modules private * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove import * changelog --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent df486a0 commit fbc1740

8 files changed

Lines changed: 2 additions & 149 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
### Breaking changes
66

7+
- Finalized making the following modules private ``_cartopy_utils``, ``_colormaps``,
8+
``_map_layout``, ``_mpl``, and ``_xrcompat``, started in v0.6.0 ([#234](https://github.com/mpytools/mplotutils/pull/234)).
79
- Removed support for python 3.11 ([#233](https://github.com/mpytools/mplotutils/pull/233)).
810

9-
1011
### Enhancements
1112

1213
### Bug fixes

mplotutils/__init__.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
)
1515
from mplotutils._colorbar import colorbar
1616
from mplotutils._colormaps import from_levels_and_cmap
17-
from mplotutils._deprecate import _module_renamed_warning_init
1817
from mplotutils._hatch import hatch, hatch_map, hatch_map_global
1918
from mplotutils._map_layout import set_map_layout
2019
from mplotutils._mpl import _get_renderer
@@ -50,28 +49,3 @@
5049
# Local copy or not installed with setuptools.
5150
# Disable minimum version checks on downstream libraries.
5251
__version__ = "999"
53-
54-
55-
def __getattr__(attr):
56-
57-
m = (
58-
"cartopy_utils",
59-
"colormaps",
60-
"map_layout",
61-
"mpl",
62-
)
63-
64-
import mplotutils
65-
66-
if attr in m:
67-
68-
_module_renamed_warning_init(attr)
69-
70-
# NOTE: could use importlib.import_module() but it registers the function in
71-
# sys.modules such that the warning is only called once
72-
# return importlib.import_module(f".{attr}", "mplotutils")
73-
74-
return getattr(mplotutils, f"_{attr}")
75-
76-
# required for ipython tab completion
77-
raise AttributeError(f"module {__name__!r} has no attribute {attr!r}")

mplotutils/_deprecate.py

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

mplotutils/cartopy_utils.py

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

mplotutils/colormaps.py

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

mplotutils/map_layout.py

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

mplotutils/mpl.py

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

mplotutils/tests/test_rename_modules.py

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

0 commit comments

Comments
 (0)