Skip to content

Commit 71a1bbd

Browse files
Merge pull request #1192 from sstsimulator/devel
Automatically Merged using SST Master Branch Merger
2 parents e66203b + 5e06091 commit 71a1bbd

File tree

8 files changed

+140
-124
lines changed

8 files changed

+140
-124
lines changed

src/sst/core/model/python/pymacros.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ REENABLE_WARNING
4646
#define SST_TP_WATCHED
4747
#endif
4848

49+
#if PY_MINOR_VERSION >= 13
50+
#define SST_TP_VERSIONS_USED 0,
51+
#else
52+
#define SST_TP_VERSIONS_USED
53+
#endif
54+
4955
// Number protocol macros
5056
#define SST_NB_DIVIDE(x)
5157
#define SST_NB_COERCE

src/sst/core/model/python/pymodel.cc

Lines changed: 51 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -88,56 +88,57 @@ DISABLE_WARN_DEPRECATED_DECLARATION
8888
#endif
8989
#endif
9090
static PyTypeObject ModuleLoaderType = {
91-
SST_PY_OBJ_HEAD "ModuleLoader", /* tp_name */
92-
sizeof(ModuleLoaderPy_t), /* tp_basicsize */
93-
0, /* tp_itemsize */
94-
nullptr, /* tp_dealloc */
95-
0, /* tp_vectorcall_offset */
96-
nullptr, /* tp_getattr */
97-
nullptr, /* tp_setattr */
98-
nullptr, /* tp_as_sync */
99-
nullptr, /* tp_repr */
100-
nullptr, /* tp_as_number */
101-
nullptr, /* tp_as_sequence */
102-
nullptr, /* tp_as_mapping */
103-
nullptr, /* tp_hash */
104-
nullptr, /* tp_call */
105-
nullptr, /* tp_str */
106-
nullptr, /* tp_getattro */
107-
nullptr, /* tp_setattro */
108-
nullptr, /* tp_as_buffer */
109-
Py_TPFLAGS_DEFAULT, /* tp_flags */
110-
"SST Module Loader", /* tp_doc */
111-
nullptr, /* tp_traverse */
112-
nullptr, /* tp_clear */
113-
nullptr, /* tp_rich_compare */
114-
0, /* tp_weaklistoffset */
115-
nullptr, /* tp_iter */
116-
nullptr, /* tp_iternext */
117-
mlMethods, /* tp_methods */
118-
nullptr, /* tp_members */
119-
nullptr, /* tp_getset */
120-
nullptr, /* tp_base */
121-
nullptr, /* tp_dict */
122-
nullptr, /* tp_descr_get */
123-
nullptr, /* tp_descr_set */
124-
0, /* tp_dictoffset */
125-
nullptr, /* tp_init */
126-
nullptr, /* tp_alloc */
127-
nullptr, /* tp_new */
128-
nullptr, /* tp_free */
129-
nullptr, /* tp_is_gc */
130-
nullptr, /* tp_bases */
131-
nullptr, /* tp_mro */
132-
nullptr, /* tp_cache */
133-
nullptr, /* tp_subclasses */
134-
nullptr, /* tp_weaklist */
135-
nullptr, /* tp_del */
136-
0, /* tp_version_tag */
137-
nullptr, /* tp_finalize */
138-
SST_TP_VECTORCALL /* Python3.8+ */
139-
SST_TP_PRINT_DEP /* Python3.8 only */
140-
SST_TP_WATCHED /* Python3.12+ */
91+
SST_PY_OBJ_HEAD "ModuleLoader", /* tp_name */
92+
sizeof(ModuleLoaderPy_t), /* tp_basicsize */
93+
0, /* tp_itemsize */
94+
nullptr, /* tp_dealloc */
95+
0, /* tp_vectorcall_offset */
96+
nullptr, /* tp_getattr */
97+
nullptr, /* tp_setattr */
98+
nullptr, /* tp_as_sync */
99+
nullptr, /* tp_repr */
100+
nullptr, /* tp_as_number */
101+
nullptr, /* tp_as_sequence */
102+
nullptr, /* tp_as_mapping */
103+
nullptr, /* tp_hash */
104+
nullptr, /* tp_call */
105+
nullptr, /* tp_str */
106+
nullptr, /* tp_getattro */
107+
nullptr, /* tp_setattro */
108+
nullptr, /* tp_as_buffer */
109+
Py_TPFLAGS_DEFAULT, /* tp_flags */
110+
"SST Module Loader", /* tp_doc */
111+
nullptr, /* tp_traverse */
112+
nullptr, /* tp_clear */
113+
nullptr, /* tp_rich_compare */
114+
0, /* tp_weaklistoffset */
115+
nullptr, /* tp_iter */
116+
nullptr, /* tp_iternext */
117+
mlMethods, /* tp_methods */
118+
nullptr, /* tp_members */
119+
nullptr, /* tp_getset */
120+
nullptr, /* tp_base */
121+
nullptr, /* tp_dict */
122+
nullptr, /* tp_descr_get */
123+
nullptr, /* tp_descr_set */
124+
0, /* tp_dictoffset */
125+
nullptr, /* tp_init */
126+
nullptr, /* tp_alloc */
127+
nullptr, /* tp_new */
128+
nullptr, /* tp_free */
129+
nullptr, /* tp_is_gc */
130+
nullptr, /* tp_bases */
131+
nullptr, /* tp_mro */
132+
nullptr, /* tp_cache */
133+
nullptr, /* tp_subclasses */
134+
nullptr, /* tp_weaklist */
135+
nullptr, /* tp_del */
136+
0, /* tp_version_tag */
137+
nullptr, /* tp_finalize */
138+
SST_TP_VECTORCALL /* Python3.8+ */
139+
SST_TP_PRINT_DEP /* Python3.8 only */
140+
SST_TP_WATCHED /* Python3.12+ */
141+
SST_TP_VERSIONS_USED /* Python3.13+ */
141142
};
142143
#if PY_MAJOR_VERSION == 3
143144
#if PY_MINOR_VERSION == 8

src/sst/core/model/python/pymodel_comp.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@ PyTypeObject PyModel_ComponentType = {
615615
SST_TP_VECTORCALL /* Python3.8+ */
616616
SST_TP_PRINT_DEP /* Python3.8 only */
617617
SST_TP_WATCHED /* Python3.12+ only */
618+
SST_TP_VERSIONS_USED /* Python3.13+ only */
618619
};
619620
#if PY_MAJOR_VERSION == 3
620621
#if PY_MINOR_VERSION == 8
@@ -726,6 +727,7 @@ PyTypeObject PyModel_SubComponentType = {
726727
SST_TP_VECTORCALL /* Python3.8+ */
727728
SST_TP_PRINT_DEP /* Python3.8 only */
728729
SST_TP_WATCHED /* Python3.12+ */
730+
SST_TP_VERSIONS_USED /* Python3.13+ only */
729731
};
730732
#if PY_MAJOR_VERSION == 3
731733
#if PY_MINOR_VERSION == 8

src/sst/core/model/python/pymodel_link.cc

Lines changed: 51 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -144,56 +144,57 @@ DISABLE_WARN_DEPRECATED_DECLARATION
144144
#endif
145145
#endif
146146
PyTypeObject PyModel_LinkType = {
147-
SST_PY_OBJ_HEAD "sst.Link", /* tp_name */
148-
sizeof(LinkPy_t), /* tp_basicsize */
149-
0, /* tp_itemsize */
150-
(destructor)linkDealloc, /* tp_dealloc */
151-
0, /* tp_vectorcall_offset */
152-
nullptr, /* tp_getattr */
153-
nullptr, /* tp_setattr */
154-
nullptr, /* tp_as_sync */
155-
nullptr, /* tp_repr */
156-
nullptr, /* tp_as_number */
157-
nullptr, /* tp_as_sequence */
158-
nullptr, /* tp_as_mapping */
159-
nullptr, /* tp_hash */
160-
nullptr, /* tp_call */
161-
nullptr, /* tp_str */
162-
nullptr, /* tp_getattro */
163-
nullptr, /* tp_setattro */
164-
nullptr, /* tp_as_buffer */
165-
Py_TPFLAGS_DEFAULT, /* tp_flags */
166-
"SST Link", /* tp_doc */
167-
nullptr, /* tp_traverse */
168-
nullptr, /* tp_clear */
169-
nullptr, /* tp_richcompare */
170-
0, /* tp_weaklistoffset */
171-
nullptr, /* tp_iter */
172-
nullptr, /* tp_iternext */
173-
linkMethods, /* tp_methods */
174-
nullptr, /* tp_members */
175-
nullptr, /* tp_getset */
176-
nullptr, /* tp_base */
177-
nullptr, /* tp_dict */
178-
nullptr, /* tp_descr_get */
179-
nullptr, /* tp_descr_set */
180-
0, /* tp_dictoffset */
181-
(initproc)linkInit, /* tp_init */
182-
nullptr, /* tp_alloc */
183-
nullptr, /* tp_new */
184-
nullptr, /* tp_free */
185-
nullptr, /* tp_is_gc */
186-
nullptr, /* tp_bases */
187-
nullptr, /* tp_mro */
188-
nullptr, /* tp_cache */
189-
nullptr, /* tp_subclasses */
190-
nullptr, /* tp_weaklist */
191-
nullptr, /* tp_del */
192-
0, /* tp_version_tag */
193-
nullptr, /* tp_finalize */
194-
SST_TP_VECTORCALL /* Python3.8+ */
195-
SST_TP_PRINT_DEP /* Python3.8 only */
196-
SST_TP_WATCHED /* Python3.12+ */
147+
SST_PY_OBJ_HEAD "sst.Link", /* tp_name */
148+
sizeof(LinkPy_t), /* tp_basicsize */
149+
0, /* tp_itemsize */
150+
(destructor)linkDealloc, /* tp_dealloc */
151+
0, /* tp_vectorcall_offset */
152+
nullptr, /* tp_getattr */
153+
nullptr, /* tp_setattr */
154+
nullptr, /* tp_as_sync */
155+
nullptr, /* tp_repr */
156+
nullptr, /* tp_as_number */
157+
nullptr, /* tp_as_sequence */
158+
nullptr, /* tp_as_mapping */
159+
nullptr, /* tp_hash */
160+
nullptr, /* tp_call */
161+
nullptr, /* tp_str */
162+
nullptr, /* tp_getattro */
163+
nullptr, /* tp_setattro */
164+
nullptr, /* tp_as_buffer */
165+
Py_TPFLAGS_DEFAULT, /* tp_flags */
166+
"SST Link", /* tp_doc */
167+
nullptr, /* tp_traverse */
168+
nullptr, /* tp_clear */
169+
nullptr, /* tp_richcompare */
170+
0, /* tp_weaklistoffset */
171+
nullptr, /* tp_iter */
172+
nullptr, /* tp_iternext */
173+
linkMethods, /* tp_methods */
174+
nullptr, /* tp_members */
175+
nullptr, /* tp_getset */
176+
nullptr, /* tp_base */
177+
nullptr, /* tp_dict */
178+
nullptr, /* tp_descr_get */
179+
nullptr, /* tp_descr_set */
180+
0, /* tp_dictoffset */
181+
(initproc)linkInit, /* tp_init */
182+
nullptr, /* tp_alloc */
183+
nullptr, /* tp_new */
184+
nullptr, /* tp_free */
185+
nullptr, /* tp_is_gc */
186+
nullptr, /* tp_bases */
187+
nullptr, /* tp_mro */
188+
nullptr, /* tp_cache */
189+
nullptr, /* tp_subclasses */
190+
nullptr, /* tp_weaklist */
191+
nullptr, /* tp_del */
192+
0, /* tp_version_tag */
193+
nullptr, /* tp_finalize */
194+
SST_TP_VECTORCALL /* Python3.8+ */
195+
SST_TP_PRINT_DEP /* Python3.8 only */
196+
SST_TP_WATCHED /* Python3.12+ */
197+
SST_TP_VERSIONS_USED /* Python3.13+ only */
197198
};
198199
#if PY_MAJOR_VERSION == 3
199200
#if PY_MINOR_VERSION == 8

src/sst/core/model/python/pymodel_stat.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ PyTypeObject PyModel_StatType = {
221221
SST_TP_VECTORCALL /* Python3.8+ */
222222
SST_TP_PRINT_DEP /* Python3.8 only */
223223
SST_TP_WATCHED /* Python3.12+ */
224+
SST_TP_VERSIONS_USED /* Python3.13+ only */
224225
};
225226
#if PY_MAJOR_VERSION == 3
226227
#if PY_MINOR_VERSION == 8

src/sst/core/model/python/pymodel_statgroup.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ PyTypeObject PyModel_StatGroupType = {
214214
SST_TP_VECTORCALL /* Python3.8+ */
215215
SST_TP_PRINT_DEP /* Python3.8 only */
216216
SST_TP_WATCHED /* Python3.12+ */
217+
SST_TP_VERSIONS_USED /* Python3.13+ only */
217218
};
218219
#if PY_MAJOR_VERSION == 3
219220
#if PY_MINOR_VERSION == 8
@@ -347,6 +348,7 @@ PyTypeObject PyModel_StatOutputType = {
347348
SST_TP_VECTORCALL /* Python3.8+ */
348349
SST_TP_PRINT_DEP /* Python3.8 only */
349350
SST_TP_WATCHED /* Python3.12+ */
351+
SST_TP_VERSIONS_USED /* Python3.13+ only */
350352
};
351353
#if PY_MAJOR_VERSION == 3
352354
#if PY_MINOR_VERSION == 8

src/sst/core/model/python/pymodel_unitalgebra.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@ PyTypeObject PyModel_UnitAlgebraType = {
505505
SST_TP_VECTORCALL /* Python3.8+ */
506506
SST_TP_PRINT_DEP /* Python3.8 only */
507507
SST_TP_WATCHED /* Python3.12+ */
508+
SST_TP_VERSIONS_USED /* Python3.13+ only */
508509
};
509510

510511
#if PY_MAJOR_VERSION == 3

src/sst/core/testingframework/test_engine_globals.py

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,42 +15,44 @@
1515
"""
1616
import os
1717

18-
from typing import TYPE_CHECKING
18+
from typing import Dict, List, TYPE_CHECKING
1919

2020
if TYPE_CHECKING:
2121
import configparser
2222

23+
from test_engine_junit import JUnitTestCase
24+
2325
# Verbose Defines
2426
VERBOSE_QUIET = 0
2527
VERBOSE_NORMAL = 1
2628
VERBOSE_LOUD = 2
2729
VERBOSE_DEBUG = 3
2830

2931
# Global Var Defines
30-
TESTRUN_TESTRUNNINGFLAG = None
31-
TESTRUN_SINGTHREAD_TESTSUITE_NAME = None
32-
TESTRUN_JUNIT_TESTCASE_DICTLISTS = None
32+
TESTRUN_TESTRUNNINGFLAG = False
33+
TESTRUN_SINGTHREAD_TESTSUITE_NAME = ""
34+
TESTRUN_JUNIT_TESTCASE_DICTLISTS: Dict[str, List["JUnitTestCase"]] = dict()
3335

34-
TESTOUTPUT_TOPDIRPATH = None
35-
TESTOUTPUT_RUNDIRPATH = None
36-
TESTOUTPUT_TMPDIRPATH = None
37-
TESTOUTPUT_XMLDIRPATH = None
36+
TESTOUTPUT_TOPDIRPATH = ""
37+
TESTOUTPUT_RUNDIRPATH = ""
38+
TESTOUTPUT_TMPDIRPATH = ""
39+
TESTOUTPUT_XMLDIRPATH = ""
3840

39-
TESTENGINE_CONCURRENTMODE = None
40-
TESTENGINE_THREADLIMIT = None
41-
TESTENGINE_DEBUGMODE = None
42-
TESTENGINE_LOGFAILMODE = None
43-
TESTENGINE_IGNORESKIPS = None
44-
TESTENGINE_VERBOSITY = None
45-
TESTENGINE_SSTRUN_NUMRANKS = None
46-
TESTENGINE_SSTRUN_NUMTHREADS = None
47-
TESTENGINE_SSTRUN_GLOBALARGS = None
48-
TESTENGINE_CORE_CONFFILE_PARSER = None
49-
TESTENGINE_CORE_CONFINCLUDE_DICT = None
50-
TESTENGINE_ELEM_CONFINCLUDE_DICT = None
41+
TESTENGINE_CONCURRENTMODE = False
42+
TESTENGINE_THREADLIMIT = 8
43+
TESTENGINE_DEBUGMODE = False
44+
TESTENGINE_LOGFAILMODE = False
45+
TESTENGINE_IGNORESKIPS = False
46+
TESTENGINE_VERBOSITY = 1
47+
TESTENGINE_SSTRUN_NUMRANKS = 1
48+
TESTENGINE_SSTRUN_NUMTHREADS = 1
49+
TESTENGINE_SSTRUN_GLOBALARGS = ""
50+
TESTENGINE_CORE_CONFFILE_PARSER: "configparser.RawConfigParser" = None # type: ignore [assignment]
51+
TESTENGINE_CORE_CONFINCLUDE_DICT: Dict[str, str] = dict()
52+
TESTENGINE_ELEM_CONFINCLUDE_DICT: Dict[str, str] = dict()
5153
TESTENGINE_ERRORCOUNT = 0
52-
TESTENGINE_SCENARIOSLIST = None
53-
TESTENGINE_TESTNOTESLIST = None
54+
TESTENGINE_SCENARIOSLIST: List[str] = []
55+
TESTENGINE_TESTNOTESLIST: List[str] = []
5456

5557
# These are some globals to pass data between the top level test engine
5658
# and the lower level testscripts
@@ -98,8 +100,8 @@ def init_test_engine_globals() -> None:
98100
TESTENGINE_VERBOSITY = 1
99101
TESTENGINE_SSTRUN_NUMRANKS = 1
100102
TESTENGINE_SSTRUN_NUMTHREADS = 1
101-
TESTENGINE_SSTRUN_GLOBALARGS = ["xxx"]
102-
TESTENGINE_CORE_CONFFILE_PARSER = None
103+
TESTENGINE_SSTRUN_GLOBALARGS = "xxx"
104+
TESTENGINE_CORE_CONFFILE_PARSER = None # type: ignore [assignment]
103105
TESTENGINE_CORE_CONFINCLUDE_DICT = {}
104106
TESTENGINE_ELEM_CONFINCLUDE_DICT = {}
105107
TESTENGINE_ERRORCOUNT = 0

0 commit comments

Comments
 (0)