sst-core
sst-core copied to clipboard
Python 3.12 fixes needed
Python 3.12 compiles with sst-core but there are some compile warnings and test warnings/failures.
- Compile warnings related to changes in cpython
- Warnings about invalid escape sequences in test frameworks and input files
- sst_unittest_support.py use of "\w" in a regex
- test_UnitAlgebra prints a "=" which is interpreted as an attempted escape sequence and warns, causing the test output to diff
sst-elements compiles but have not yet tried tests. Probably some similar issues.
With 3.12, the element library python modules do not seem to load correctly. For now, we won't be able to support python 3.12 for any element library that has python modules.
This is the core reason why elements tests fail on Ubuntu 24.04, because they ship Python 3.12.
Additionally, at the top of the output from sst-test-elements
:
/home/sstbuild/sst-elements/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_memHA.py:286: SyntaxWarning: invalid escape sequence '\w'
cons_accum = re.compile(' ([\w.]+)\.(\w+) : Accumulator : Sum.(\w+) = (\d+); SumSQ.\w+ = (\d+); Count.\w+ = (\d+); Min.\w+ = (\d+); Max.\w+ = (\d+);')
This needs to be a raw string.
Fixed in https://github.com/sstsimulator/sst-core/pull/1073