Migrating Pology to Python 3

Luigi Toscano luigi.toscano at tiscali.it
Sat Dec 24 14:28:43 GMT 2022


Johnny Jazeix ha scritto:
> Hi,
> 
> I've spotted an issue when using posieve with check_rules or check-spell and
> wanted to output in xml.
> https://invent.kde.org/sdk/pology/-/blob/python3/sieve/check_rules.py#L211
> does not like the decode().
> The same exists in
> https://invent.kde.org/sdk/pology/-/blob/python3/sieve/check_spell.py#L116
> 
> I'm not sure if only removing the " |.decode(locale.getpreferredencoding()| "
> or how to replace it to keep this functionality.
> 


I've tried your suggestion and it seems to be the right way, thus making
check-rules work, I'm going to push a change.

The problem with check_spell, on the other hand, is that it seems broken even
with python2, as the call to aspell leads to a segmentation fault, at least on
Debian testing. check_spell wraps aspell directly, calling the C library. My
suggestion would be to drop check_spell completely and use check_spell_ec,
which is based on the enchant library, which works. Maybe even rename it as
check_spell. Unfortunately it doesn't support XML output right now.

Ciao
-- 
Luigi


More information about the kde-i18n-doc mailing list