Package: src:mwic
Version: 0.7.10-3
User: [email protected]
Usertags: python3.15
Tags: ftbfs, forky, sid
Severity: serious

Hi!

While rebuilding the python related packages against the Python 3.15 version we found that mwic fails to build from source:
https://debusine.debian.net/debian/r-python-python3.15/artifact/4856505/

But this is also failing in the reproducible builds infrastructure, so it's not a Python 3.15 specific issue:
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/mwic.html

From the log, there are several tests failing with this error:
____________________________ test_max_context_width ____________________________

    def test_max_context_width():
        bad_word = random_word()
text = _get_output('--language', 'en', '--max-context-width=2', stdin=f'yes {bad_word} yes')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/test_blackbox.py:69:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_blackbox.py:51: in _get_output
    M.main()
lib/cli.py:122: in main
    dictionary = enchant.Dict(options.language)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/enchant/__init__.py:553: in __init__
    super().__init__()
/usr/lib/python3/dist-packages/enchant/__init__.py:149: in __init__
    self._init_this()
/usr/lib/python3/dist-packages/enchant/__init__.py:560: in _init_this
    this = self._broker._request_dict_data(self.tag)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/enchant/__init__.py:296: in _request_dict_data
    self._raise_error(e_str % (tag,), DictNotFoundError)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <enchant.Broker object at 0x7f98efc07b60>
default = "Dictionary for language 'en' could not be found\nPlease check https://pyenchant.github.io/pyenchant/ for details"
eclass = <class 'enchant.errors.DictNotFoundError'>

    def _raise_error(
self, default: str = "Unspecified Error", eclass: Type[Error] = Error
    ) -> NoReturn:
"""Overrides _EnchantObject._raise_error to check broker errors."""
        err = _e.broker_get_error(self._this)
      if err == "" or err is None:
           ^^^^^^^^^
E       BytesWarning: Comparison between bytes and string

It seems the BytesWarning is actually raised in enchant, so that might be a bug for enchant and not for mwic, but even if that was fixed, the code would still raise an error because it's not finding the dictionary.

When looking at the installation during the build failure, hunspell-en-gb is installed, but maybe enchant handles it as "en_GB" instead of "en"?

--
Regards,
Marga

Reply via email to