Tuesday, December 19, 2017

I upgraded The Lino framework which had become quite obsolete. This revealed ticket #2218, yet another example of Py2to3 problems. In lino_welfare.modlib.welfare fixture I had:

from builtins import str
...
FUNCTIONS = Cycler(cv.Function.objects.all())
...
def objects():
    f = FUNCTIONS.pop()
    ...
    yield jobs.Job(... name=str(f), ...)

The problem disappeared when I changed this to:

import six
...
FUNCTIONS = Cycler(cv.Function.objects.all())
...
def objects():
    f = FUNCTIONS.pop()
    ...
    yield jobs.Job(... name=six.text_type(f), ...)

Ticket #2220 was an easy customer request.