From 79aefd82a4faefd41255e5613db913c1a0015838 Mon Sep 17 00:00:00 2001 From: jmlapre <110123055+jmlapre@users.noreply.github.com> Date: Fri, 27 Sep 2024 13:42:30 -0400 Subject: [PATCH] deprecate testing_is_PIN2_used() (#1136) --- src/sst/core/testingframework/sst_unittest_support.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sst/core/testingframework/sst_unittest_support.py b/src/sst/core/testingframework/sst_unittest_support.py index 5fb46232e..cd2e4fc30 100644 --- a/src/sst/core/testingframework/sst_unittest_support.py +++ b/src/sst/core/testingframework/sst_unittest_support.py @@ -32,6 +32,11 @@ from test_engine_support import OSCommand from test_engine_support import check_param_type +if not sys.warnoptions: + import os, warnings + warnings.simplefilter("once") # Change the filter in this process + os.environ["PYTHONWARNINGS"] = "once" # Also affect subprocesses + ################################################################################ OS_DIST_OSX = "OSX" @@ -136,6 +141,10 @@ def testing_is_PIN_Compiled(): return rtn def testing_is_PIN2_used(): + from warnings import warn + warn("testing_is_PIN2_used() is deprecated and will be removed in future versions of SST.", + DeprecationWarning, stacklevel=2) + global pin_exec_path if testing_is_PIN_Compiled(): if "/pin.sh" in pin_exec_path: