Recently we noticed that part of the instability in nextpnr-fpga_interchange toolchains was caused by incorrect usage of str.lstrip() and str.rstrip() functions during log parsing.
This PR changes the wrong occurrences of those function calls to removeprefix() and removesuffix() functions respectively. The functions from the python library (str.removeprefix(), str.removesuffix()) are not used because they were introduced in Python 3.9 and we want to be compatible with older versions of python.
The incorrect usage of str.lstrip() and str.rstrip() led to incorrect calculations of execution times in the nextpnr-fpga_interchange toolchain (most notably in the routing time results).
Recently we noticed that part of the instability in nextpnr-fpga_interchange toolchains was caused by incorrect usage of
str.lstrip()
andstr.rstrip()
functions during log parsing.This PR changes the wrong occurrences of those function calls to
removeprefix()
andremovesuffix()
functions respectively. The functions from the python library (str.removeprefix()
,str.removesuffix()
) are not used because they were introduced in Python 3.9 and we want to be compatible with older versions of python.The incorrect usage of
str.lstrip()
andstr.rstrip()
led to incorrect calculations of execution times in thenextpnr-fpga_interchange
toolchain (most notably in the routing time results).