From 3ba684aea1fac57c96fea359cbef9d652f93f324 Mon Sep 17 00:00:00 2001 From: vigneshvetrivel8 Date: Tue, 26 Sep 2023 12:24:58 +0530 Subject: [PATCH 1/3] updated deprecated api tri --- lib/matplotlib/tri/triangulation.py | 9 +++------ lib/matplotlib/tri/tricontour.py | 9 ++++----- lib/matplotlib/tri/trifinder.py | 8 +++----- lib/matplotlib/tri/triinterpolate.py | 8 +++----- lib/matplotlib/tri/tripcolor.py | 8 +++----- lib/matplotlib/tri/triplot.py | 8 +++----- lib/matplotlib/tri/trirefine.py | 8 +++----- lib/matplotlib/tri/tritools.py | 8 +++----- 8 files changed, 25 insertions(+), 41 deletions(-) diff --git a/lib/matplotlib/tri/triangulation.py b/lib/matplotlib/tri/triangulation.py index c48b09b280ff..eee034fb4c32 100644 --- a/lib/matplotlib/tri/triangulation.py +++ b/lib/matplotlib/tri/triangulation.py @@ -1,9 +1,6 @@ from ._triangulation import * # noqa: F401, F403 from matplotlib import _api - -_api.warn_deprecated( - "3.7", - message=f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " - f"be removed two minor releases later. All functionality is " - f"available via the top-level module matplotlib.tri") +raise ValueError(f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " + f"be removed two minor releases later. All functionality is " + f"available via the top-level module matplotlib.tri") \ No newline at end of file diff --git a/lib/matplotlib/tri/tricontour.py b/lib/matplotlib/tri/tricontour.py index 37406451d376..932a6ff0f941 100644 --- a/lib/matplotlib/tri/tricontour.py +++ b/lib/matplotlib/tri/tricontour.py @@ -2,8 +2,7 @@ from matplotlib import _api -_api.warn_deprecated( - "3.7", - message=f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " - f"be removed two minor releases later. All functionality is " - f"available via the top-level module matplotlib.tri") +raise ValueError(f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " + f"be removed two minor releases later. All functionality is " + f"available via the top-level module matplotlib.tri") + diff --git a/lib/matplotlib/tri/trifinder.py b/lib/matplotlib/tri/trifinder.py index 1aff5c9d3280..d237f9dfb592 100644 --- a/lib/matplotlib/tri/trifinder.py +++ b/lib/matplotlib/tri/trifinder.py @@ -2,8 +2,6 @@ from matplotlib import _api -_api.warn_deprecated( - "3.7", - message=f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " - f"be removed two minor releases later. All functionality is " - f"available via the top-level module matplotlib.tri") +raise ValueError(f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " + f"be removed two minor releases later. All functionality is " + f"available via the top-level module matplotlib.tri") diff --git a/lib/matplotlib/tri/triinterpolate.py b/lib/matplotlib/tri/triinterpolate.py index 3112bd38e6c6..e814e7830ad5 100644 --- a/lib/matplotlib/tri/triinterpolate.py +++ b/lib/matplotlib/tri/triinterpolate.py @@ -2,8 +2,6 @@ from matplotlib import _api -_api.warn_deprecated( - "3.7", - message=f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " - f"be removed two minor releases later. All functionality is " - f"available via the top-level module matplotlib.tri") +raise ValueError(f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " + f"be removed two minor releases later. All functionality is " + f"available via the top-level module matplotlib.tri") diff --git a/lib/matplotlib/tri/tripcolor.py b/lib/matplotlib/tri/tripcolor.py index 0da87891810d..1b0f176fbf0e 100644 --- a/lib/matplotlib/tri/tripcolor.py +++ b/lib/matplotlib/tri/tripcolor.py @@ -2,8 +2,6 @@ from matplotlib import _api -_api.warn_deprecated( - "3.7", - message=f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " - f"be removed two minor releases later. All functionality is " - f"available via the top-level module matplotlib.tri") +raise ValueError(f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " + f"be removed two minor releases later. All functionality is " + f"available via the top-level module matplotlib.tri") diff --git a/lib/matplotlib/tri/triplot.py b/lib/matplotlib/tri/triplot.py index 7c012b1a59e7..c768696bd024 100644 --- a/lib/matplotlib/tri/triplot.py +++ b/lib/matplotlib/tri/triplot.py @@ -2,8 +2,6 @@ from matplotlib import _api -_api.warn_deprecated( - "3.7", - message=f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " - f"be removed two minor releases later. All functionality is " - f"available via the top-level module matplotlib.tri") +raise ValueError(f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " + f"be removed two minor releases later. All functionality is " + f"available via the top-level module matplotlib.tri") diff --git a/lib/matplotlib/tri/trirefine.py b/lib/matplotlib/tri/trirefine.py index 6f22f9e8d203..63679571cf3e 100644 --- a/lib/matplotlib/tri/trirefine.py +++ b/lib/matplotlib/tri/trirefine.py @@ -2,8 +2,6 @@ from matplotlib import _api -_api.warn_deprecated( - "3.7", - message=f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " - f"be removed two minor releases later. All functionality is " - f"available via the top-level module matplotlib.tri") +raise ValueError(f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " + f"be removed two minor releases later. All functionality is " + f"available via the top-level module matplotlib.tri") \ No newline at end of file diff --git a/lib/matplotlib/tri/tritools.py b/lib/matplotlib/tri/tritools.py index 9c6839ca2049..027b917f3cf5 100644 --- a/lib/matplotlib/tri/tritools.py +++ b/lib/matplotlib/tri/tritools.py @@ -2,8 +2,6 @@ from matplotlib import _api -_api.warn_deprecated( - "3.7", - message=f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " - f"be removed two minor releases later. All functionality is " - f"available via the top-level module matplotlib.tri") +raise ValueError(f"Importing {__name__} was deprecated in Matplotlib 3.7 and will " + f"be removed two minor releases later. All functionality is " + f"available via the top-level module matplotlib.tri") From 97a8835164605a3b0fc519bc24913c19795841c9 Mon Sep 17 00:00:00 2001 From: vigneshvetrivel8 Date: Tue, 26 Sep 2023 12:47:13 +0530 Subject: [PATCH 2/3] updated deprecated api tri --- doc/api/next_api_changes/removals/00001-ABC.rst | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/api/next_api_changes/removals/00001-ABC.rst b/doc/api/next_api_changes/removals/00001-ABC.rst index 3cc5b6344f7f..39525a7a4df2 100644 --- a/doc/api/next_api_changes/removals/00001-ABC.rst +++ b/doc/api/next_api_changes/removals/00001-ABC.rst @@ -1,7 +1,4 @@ -Removal change template +Deprecated api modified ~~~~~~~~~~~~~~~~~~~~~~~ -Enter description of methods/classes removed here.... - -Please rename file with PR number and your initials i.e. "99999-ABC.rst" -and ``git add`` the new file. +_api.warn_deprecated is replaced with valueError \ No newline at end of file From 7f75c30998c2bda84a2fe8981489899edbb7e4e4 Mon Sep 17 00:00:00 2001 From: vigneshvetrivel8 Date: Tue, 26 Sep 2023 12:50:01 +0530 Subject: [PATCH 3/3] updated deprecated api tri --- doc/api/next_api_changes/removals/00001-ABC.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/next_api_changes/removals/00001-ABC.rst b/doc/api/next_api_changes/removals/00001-ABC.rst index 39525a7a4df2..340bb3b032c2 100644 --- a/doc/api/next_api_changes/removals/00001-ABC.rst +++ b/doc/api/next_api_changes/removals/00001-ABC.rst @@ -1,4 +1,6 @@ Deprecated api modified ~~~~~~~~~~~~~~~~~~~~~~~ -_api.warn_deprecated is replaced with valueError \ No newline at end of file +_api.warn_deprecated is replaced with valueError + +The modification is for ``lib/matplotlib/tri/*.py``.