[mythtv] Moving to Python 3 problems

Bill Meek keemllib at gmail.com
Fri Nov 30 17:34:13 UTC 2018


On 11/30/18 9:37 AM, David Hampton wrote:
> Its on my long list too.  My concern is that there are no tests for the
> basic functionality of the bindings, so how would I know if I'd broken
> them in the conversion. Thinking about that makes me think I should
> write test cases first, but to do that there would need to be a
> standardized database to test against that's in the source, which leads
> me to think that we need an option for an embedded mysql database for
> testing, which makes me go think about other things.
> 
> I'd be happy to take a swing at it after I finish my current project,
> but I'll definitely need some help on the testing side.  It would be
> nice to get this into the next release...
> 
> David

I've used the 2to3 tool: 2to3-2.7 --no-backups --no-diffs --write .
from the .../mythtv/mythtv/bindings/python directory.

It completes without error (tested on ubuntu 18.10.) For now, just
adding PYTHON=python3 in the Makefile after the include line. make and
sudo make install also complete.

But programs error out. So there appears to be more things that the tool
doesn't catch. I've only solved one, and it was very simple (removing all
's from a MySQLdb.version_info >= ('1','2','2') line.)

I couldn't find any unit tests in the bindings either, let alone data.

-- 
Bill


More information about the mythtv-dev mailing list