Migrating Pology to Python 3
Johnny Jazeix
jazeix at gmail.com
Sat Dec 24 14:58:51 GMT 2022
Le sam. 24 déc. 2022 à 15:28, Luigi Toscano <luigi.toscano at tiscali.it> a
écrit :
> 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.
>
>
Thank you!
For check_spell, yes, it segfauts too on my computer (archlinux) and other
French translators. I've tried using the latest version of pyaspell (
https://github.com/WojciechMula/aspell-python/blob/master/pyaspell/pyaspell.py)
but didn't work better, it still crashes in
https://invent.kde.org/sdk/pology/-/blob/python3/pology/external/pyaspell.py#L68
.
I haven't tested check_spell_ec, I'll take a look later.
Johnny
Ciao
> --
> Luigi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20221224/cf2ca660/attachment.htm>
More information about the kde-i18n-doc
mailing list