Ticket #69362: python312.patch

File python312.patch, 989 bytes (added by ryandesign (Ryan Carsten Schmidt), 6 months ago)
  • site_scons/site_tools/subst.py

    Fix syntax warnings for Python 3.12
    https://github.com/Cantera/cantera/commit/25b52d3d1d974d8279026332340d690e42c111c5
     
    130130# Replace @key@ with the value of that key, and @@ with a single @
    131131##############################################################################
    132132
    133 _SubstFile_pattern = "@(?P<key>\w*?)@"
     133_SubstFile_pattern = r"@(?P<key>\w*?)@"
    134134def _SubstFile_replace(env, mo):
    135135    key = mo.group("key")
    136136    if not key:
     
    167167# other defines that you do not desire to be replaced.
    168168##############################################################################
    169169
    170 _SubstHeader_pattern = "(?m)^(?P<space>\\s*?)(?P<type>#define|#undef)\\s+?@(?P<key>\w+?)@(?P<ending>.*?)$"
     170_SubstHeader_pattern = r"(?m)^(?P<space>\\s*?)(?P<type>#define|#undef)\\s+?@(?P<key>\w+?)@(?P<ending>.*?)$"
    171171def _SubstHeader_replace(env, mo):
    172172    space = mo.group("space")
    173173    type = mo.group("type")