pmrep: revert to ascii
In
06b8c19 we compressed the pmrep unit strings in headers and for
microseconds we used non-ascii µs form. This works with Python 3
but we failed to remember that with Python 2 strings are not
Unicode by default and later when formatting the output, it's the
format string's encoding that determines the encoding used.
So this is what we should use:
#!/usr/bin/python2
# -*- coding: utf-8 -*-
a = [":", "u/s", ":", "us/s", ":"]
u = [":", u"µs/s", ":", u"µs/s", ":"]
fmt = u"{0}{1:>15.15}{2}{3:>15.15}{4}"
print(fmt.format(*tuple(a)))
print(fmt.format(*tuple(u)))
Without using unicode formatting will be off as multi-byte
characters take the same screen estate as single-byte chars.
But: even after the corresponding changes to pmrep I still get QA
failures with Python 2 here. Given the recent Python QA issue Ken
has hit elsewhere it sounds like this might be a recipe for lots
of additional QA headaches so I'm leaning towards reverting back
to ASCII. And "us" instead "µs" is already used elsewhere in PCP.
Later, if wanted, once the QA is on green on again we can see if
we want introduce this (not-so-critical) change again.