perf tools: Address python 3.6 DeprecationWarning for string scapes