some uses of str.format remain, but converting them would be more trouble than it's worth (cherry picked from commit f17cffa3ec5329988a58c76f8fa4f3fe4846a6fc)
(cherry picked from commit 837d6b378e02b1a17b1154bf104d52cb5c21a2f3)