sst-core icon indicating copy to clipboard operation
sst-core copied to clipboard

Python 3.12 fixes needed

Open gvoskuilen opened this issue 1 year ago • 1 comments

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.

gvoskuilen avatar Oct 04 '23 17:10 gvoskuilen

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.

feldergast avatar Oct 20 '23 18:10 feldergast

This is the core reason why elements tests fail on Ubuntu 24.04, because they ship Python 3.12.

berquist avatar May 07 '24 13:05 berquist

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.

berquist avatar May 07 '24 13:05 berquist

Fixed in https://github.com/sstsimulator/sst-core/pull/1073

berquist avatar May 09 '24 20:05 berquist