Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920278 - x11-misc/xkeyboard-config-2.40-r1 fails tests with >dev-python/pycountry-22.3.5: AssertionError: unknown language code "ais" in tw(indigenous)
Summary: x11-misc/xkeyboard-config-2.40-r1 fails tests with >dev-python/pycountry-22.3...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: 917501
  Show dependency tree
 
Reported: 2023-12-18 16:38 UTC by matoro
Modified: 2023-12-21 14:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (file_920278.txt,29.29 KB, text/plain)
2023-12-18 16:46 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2023-12-18 16:38:36 UTC
build.log and emerge --info in attachment.  Log is from ppc64le but I have reproduced this on multiple platforms.

_______________________________________________________________________ test_iso639[layout1325] _______________________________________________________________________
[gw3] linux -- Python 3.12.1 /usr/bin/python3.12
 
layout = <tests.test_rules_xml.Layout object at 0x7fff7f22da00>
 
    def test_iso639(layout):
        """Typically layouts should should specify at least one language code"""
        pycountry = pytest.importorskip("pycountry")
    
        # A list of languages not in pycountry, so we need to special-case them
        special_langs = [
            "ber",  # Berber languages (collective), https://iso639-3.sil.org/code/ber
            "btb",  # Beti (Cameroon), https://iso639-3.sil.org/code/btb
            "fox",  # Formosan languages (collective), https://iso639-3.sil.org/code/fox
            "phi",  # Philippine languages (collective), https://iso639-3.sil.org/code/phi
            "ovd",  # Elfdalian, https://iso639-3.sil.org/code/ovd
        ]
        language_codes = [c.alpha_3 for c in pycountry.languages] + special_langs
        expected_without_language = ["brai", "custom", "trans"]
    
        for code in layout.iso639:
>           assert (
                code in language_codes
            ), f'{layout.rulesfile}: unknown language code "{code}" in {layout.name}'
E           AssertionError: /var/tmp/portage/x11-misc/xkeyboard-config-2.40-r1/work/xkeyboard-config-2.40-build/rules/evdev.xml: unknown language code "ais" in tw(indigenous)
E           assert 'ais' in ['aaa', 'aab', 'aac', 'aad', 'aae', 'aaf', ...]
 
tests/test_rules_xml.py:269: AssertionError

Reproducible: Always
Comment 1 matoro archtester 2023-12-18 16:46:20 UTC
Created attachment 879877 [details]
build.log and emerge --info
Comment 2 Alfred Wingate 2023-12-19 08:26:33 UTC
This issue due to ISO639-3 changes in >pycountry-22.3.5. So its doesn't match anymore.

https://github.com/pycountry/pycountry/commit/a2341a11df5b5fddb26519e9b9cbe1befdee74a9
Comment 3 Larry the Git Cow gentoo-dev 2023-12-21 14:54:34 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ecfe96d99aed2238535bd2ee6df24732febeebf

commit 2ecfe96d99aed2238535bd2ee6df24732febeebf
Author:     Alfred Wingate <parona@protonmail.com>
AuthorDate: 2023-12-19 08:58:35 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2023-12-21 14:54:29 +0000

    x11-misc/xkeyboard-config: restrict <pycountry-23.12.7
    
    * Fix usage of python_has_version.
    * Unkeyword ~s390 again.
    
    Bug: https://bugs.gentoo.org/917501
    Closes: https://bugs.gentoo.org/920278
    Closes: https://github.com/gentoo/gentoo/pull/34367
    Signed-off-by: Alfred Wingate <parona@protonmail.com>
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 x11-misc/xkeyboard-config/xkeyboard-config-2.40-r1.ebuild | 12 +++++++-----
 x11-misc/xkeyboard-config/xkeyboard-config-9999.ebuild    | 10 ++++++----
 2 files changed, 13 insertions(+), 9 deletions(-)