py2/py3: stop using deprecated string functions, that are removed in python 3.

9 jobs for for_testrunner_1
in 0 seconds, using 0 compute credits, and was queued for 0 seconds