[lo] text formatter: adaptation for Python 3.8