Run Dogtail using Python 3
Currently we install
python-dogtail, which uses Python 2 and makes it impossible to deal with objects containing unicode character (e.g. "Save As…" — note the triple dots) aka. https://bugs.debian.org/728658. This was originally tracked on #12185 that got repurposed in the meantime.
Debian testing (Bullseye) now has 0.9.11-2 with a
python3-dogtail binary package that should be installable on Stretch and Buster, and allow us to drop some ugly hacks from our test suite.
This is part of our #15953 roadmap item.
Test suite: install Dogtail from Bullseye and run it with Python 3 (refs: #16976)
This will give us UTF-8 support.
Note the switch from raw bytes IO to StringIO: the equivalent of what we used to
do in Python 3 is io.BytesIO(), but that won't work out of the box: the code
we're running prints strings on stdout/stderr, not bytes, and Python 3 knows
the difference. So accordingly, remove decoding of the output, since we get
a string already.
Drop anonym's "showingOnly" patch that was merged upstream :)
I'm giving it a quick try as while working on #16004, I'm fed up that my workaround to the lack of UTF-8 support (using Sikuli in the middle of a scenario that otherwise nicely uses Dogtail) is brittle on Jenkins, while it Works On My Machine™. Over the last two days I had to add 3 new such workarounds and I figured that enough was enough.
I'm not promising anything at this point though, so I won't even assign this ticket to myself.