From 3a261e35bb6c861b6cd31108d015ef0de5caf20d Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Mon, 9 Sep 2024 17:44:51 -0600 Subject: [PATCH 1/7] Add v1.x deprecation warning --- icepyx/__init__.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/icepyx/__init__.py b/icepyx/__init__.py index a9d61834b..bff268abd 100644 --- a/icepyx/__init__.py +++ b/icepyx/__init__.py @@ -1,5 +1,16 @@ -from _icepyx_version import version as __version__ +from warnings import warn + +deprecation_msg = """icepyx v1.x is deprecated; the back-end systems on which is relies +are being shut down. Please upgrade to icepyx v2.x which uses the new NASA Harmony +back-end. +""" +# IMPORTANT: This is being done before the other icepyx imports because the imported +# code changes warning filters. If this is done after the imports, the warning won't +# work. +warn(deprecation_msg, DeprecationWarning, stacklevel=2) + +from _icepyx_version import version as __version__ from icepyx.core.query import GenQuery, Query from icepyx.core.read import Read from icepyx.core.variables import Variables From 5edc7d2789c253ee69ef79ac1f5c7cbadb3e6929 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 23:45:31 +0000 Subject: [PATCH 2/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- icepyx/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/icepyx/__init__.py b/icepyx/__init__.py index bff268abd..17154940c 100644 --- a/icepyx/__init__.py +++ b/icepyx/__init__.py @@ -11,6 +11,7 @@ from _icepyx_version import version as __version__ + from icepyx.core.query import GenQuery, Query from icepyx.core.read import Read from icepyx.core.variables import Variables From 08db71d90bb59d9e6aff13c543081871c28367ae Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Thu, 12 Sep 2024 20:15:55 -0600 Subject: [PATCH 3/7] Tweak deprecation message to make timeline clearer Co-Authored-By: Jessica Scheick --- icepyx/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/icepyx/__init__.py b/icepyx/__init__.py index 17154940c..7cb481455 100644 --- a/icepyx/__init__.py +++ b/icepyx/__init__.py @@ -1,8 +1,8 @@ from warnings import warn -deprecation_msg = """icepyx v1.x is deprecated; the back-end systems on which is relies -are being shut down. Please upgrade to icepyx v2.x which uses the new NASA Harmony -back-end. +deprecation_msg = """icepyx v1.x is deprecated; the back-end systems on which it relies +will be shut down as of late 2024. At that time, upgrade to icepyx v2.x, which uses the +new NASA Harmony back-end, will be required. """ # IMPORTANT: This is being done before the other icepyx imports because the imported # code changes warning filters. If this is done after the imports, the warning won't From c581ffab94dc3ac8759059851c6164cf5ed1f64f Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Thu, 12 Sep 2024 20:18:58 -0600 Subject: [PATCH 4/7] Add link to 1.3 release page --- icepyx/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/icepyx/__init__.py b/icepyx/__init__.py index 7cb481455..13cbfe9d3 100644 --- a/icepyx/__init__.py +++ b/icepyx/__init__.py @@ -2,7 +2,9 @@ deprecation_msg = """icepyx v1.x is deprecated; the back-end systems on which it relies will be shut down as of late 2024. At that time, upgrade to icepyx v2.x, which uses the -new NASA Harmony back-end, will be required. +new NASA Harmony back-end, will be required. Please see + for more +information! """ # IMPORTANT: This is being done before the other icepyx imports because the imported # code changes warning filters. If this is done after the imports, the warning won't @@ -11,7 +13,6 @@ from _icepyx_version import version as __version__ - from icepyx.core.query import GenQuery, Query from icepyx.core.read import Read from icepyx.core.variables import Variables From a33adff911283931a2e9462de293aa992d14ec69 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 02:19:14 +0000 Subject: [PATCH 5/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- icepyx/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/icepyx/__init__.py b/icepyx/__init__.py index 13cbfe9d3..b7548c269 100644 --- a/icepyx/__init__.py +++ b/icepyx/__init__.py @@ -13,6 +13,7 @@ from _icepyx_version import version as __version__ + from icepyx.core.query import GenQuery, Query from icepyx.core.read import Read from icepyx.core.variables import Variables From 4d2d232d326580773509f95acac6ab0a24a0a404 Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Thu, 12 Sep 2024 22:42:11 -0600 Subject: [PATCH 6/7] Raise FutureWarning instead of DeprecationWarning --- icepyx/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icepyx/__init__.py b/icepyx/__init__.py index b7548c269..11880244c 100644 --- a/icepyx/__init__.py +++ b/icepyx/__init__.py @@ -9,7 +9,7 @@ # IMPORTANT: This is being done before the other icepyx imports because the imported # code changes warning filters. If this is done after the imports, the warning won't # work. -warn(deprecation_msg, DeprecationWarning, stacklevel=2) +warn(deprecation_msg, FutureWarning, stacklevel=2) from _icepyx_version import version as __version__ From aaa90b607e3435835635492db6c2d79909f4a351 Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Fri, 13 Sep 2024 12:19:45 -0600 Subject: [PATCH 7/7] Tweak deprecation language from PR feedback Co-authored-by: Jessica Scheick --- icepyx/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icepyx/__init__.py b/icepyx/__init__.py index 11880244c..b0cd8095d 100644 --- a/icepyx/__init__.py +++ b/icepyx/__init__.py @@ -1,6 +1,6 @@ from warnings import warn -deprecation_msg = """icepyx v1.x is deprecated; the back-end systems on which it relies +deprecation_msg = """icepyx v1.x is being deprecated; the back-end systems on which it relies will be shut down as of late 2024. At that time, upgrade to icepyx v2.x, which uses the new NASA Harmony back-end, will be required. Please see for more