psam added the comment:
The problem was detected in a Django project, as the template engine was not
able to support the original encoding.
I don't have a real test code snippet, but you may try something like:
isinstance(calendar.LocaleTextCalendar(locale='').formatmonth(2
New submission from psam :
The v2.6 of __enter__() of TimeEncoding has been fixed in v2.7 in relation with
the return of setlocale(), but for no apparent reason, its necessary returned
value is no more there.
Patch:
def __enter__(self):
self.oldlocale = _locale.getlocale