FS#56535 - [python2-pyenchant] not compatible with enchant 2.x

Attached to Project: Community Packages
Opened by Jeb Rosen (jebrosen) - Friday, 01 December 2017, 23:23 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 03 December 2017, 14:16 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jelle van der Waa (jelly)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

python2-pyenchant does not build against enchant 2.1.2-2 with the following error:

==> Starting build()...
Traceback (most recent call last):
File "setup.py", line 212, in <module>
import enchant
File "/build/python-pyenchant/src/pyenchant-1.6.11/enchant/__init__.py", line 92, in <module>
from enchant import _enchant as _e
File "/build/python-pyenchant/src/pyenchant-1.6.11/enchant/_enchant.py", line 312, in <module>
dict_is_in_session1 = e.enchant_dict_is_in_session
File "/usr/lib/python3.6/ctypes/__init__.py", line 361, in __getattr__
func = self.__getitem__(name)
File "/usr/lib/python3.6/ctypes/__init__.py", line 366, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib/libenchant.so: undefined symbol: enchant_dict_is_in_session


There is an upstream bug report with no response: https://github.com/rfk/pyenchant/issues/116
abiword 3.0.2-6 has an enchant 2.x patch referencing enchant_dict_is_in_session, but no similar patches have been applied to pyenchant: https://git.archlinux.org/svntogit/packages.git/diff/trunk/enchant-2.1.patch?h=packages/abiword&id=0eef8b81e029f0982a40b04b1c8f0fbddfa9f801

I noticed this because spell checking has become unavailable in zim, and pyenchant is in the dependency tree for that feature.
This task depends upon

Closed by  Jelle van der Waa (jelly)
Sunday, 03 December 2017, 14:16 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in -2 in [testing]
Comment by Jelle van der Waa (jelly) - Saturday, 02 December 2017, 19:55 GMT
The ABI broke, so everything python program using enchant.is_in_session() should update that call to Dict.is_added.
Comment by Jelle van der Waa (jelly) - Saturday, 02 December 2017, 20:46 GMT
I've patched our package and created a PR upstream to remove the deprecated enchant_dict_is_in_session. Which fixes importing the lib and building it.
Comment by Jeb Rosen (jebrosen) - Saturday, 02 December 2017, 21:26 GMT
Thanks, and spell checking appears to work again in zim.

Loading...