Package Details: python-hid-parser 0.0.3-6

Git Clone URL: https://aur.archlinux.org/python-hid-parser.git (read-only, click to copy)
Package Base: python-hid-parser
Description: Typed pure Python library to parse HID report descriptors
Upstream URL: https://github.com/usb-tools/python-hid-parser
Licenses: MIT
Conflicts: solaar
Submitter: freswa
Maintainer: alllexx88
Last Packager: alllexx88
Votes: 4
Popularity: 3.48
First Submitted: 2024-04-04 18:47 (UTC)
Last Updated: 2024-04-29 12:32 (UTC)

Latest Comments

1 2 Next › Last »

alllexx88 commented on 2024-04-29 12:32 (UTC)

@samuel.jimenez Thanks, done.

samuel.jimenez commented on 2024-04-28 21:53 (UTC)

A recent commit to solaar adds hid_parser to packages installed. Can solaar be added to conflicts in PKGBUILD?

PortableAlgebra commented on 2024-04-14 20:25 (UTC)

@alllexx88

Thanks for the help with this! It's all working smoothly now. I really appreciate you maintaining this package and doing what you can to help people like me.

vinicentus commented on 2024-04-09 08:41 (UTC)

@alllexx88 good solution! That should fix users being confused and should remove the need for them to actually come here and read the comments to fix their problem :D

Thanks!

alllexx88 commented on 2024-04-09 07:42 (UTC)

I bumped pkgrel to force aur helpers checkout the current HEAD.

alllexx88 commented on 2024-04-09 07:39 (UTC)

@PortableAlgebra you're still building the old version, it even says so in your log:

HEAD is now at 62222c5 Adding .SRCINFO

(see https://aur.archlinux.org/cgit/aur.git/log/?h=python-hid-parser)

Clean the cached package dir:

sudo rm -rf /home/portablealgebra/.cache/yay/python-hid-parser

PortableAlgebra commented on 2024-04-08 18:08 (UTC) (edited on 2024-04-08 18:28 (UTC) by PortableAlgebra)

0.0.3-3 still fails, but python-hid-parser-git works in the meantime.

Long yay install log

[portablealgebra@myarchinstall ~]$ yay
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
:: Searching AUR for updates...
:: Searching databases for updates...
:: 1 package to upgrade/install.
1  aur/python-hid-parser  0.0.3-2 -> 0.0.3-3
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> Excluding packages may cause partial upgrades and break systems
==> 
AUR Dependency (1): python-hid-parser-0.0.3-3
:: PKGBUILD up to date, skipping download: python-hid-parser
  1 python-hid-parser                        (Installed) (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> A
:: Deleting (1/1): /home/portablealgebra/.cache/yay/python-hid-parser
HEAD is now at 62222c5 Adding .SRCINFO
warning: could not open directory 'pkg/': Permission denied
Removing pkg/
Removing python-hid-parser-0.0.3.tar.gz
Removing src/
  1 python-hid-parser                        (Installed) (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> N
==> Making package: python-hid-parser 0.0.3-2 (Mon 08 Apr 2024 11:00:50 AM PDT)
==> Retrieving sources...
  -> Downloading python-hid-parser-0.0.3.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 28375    0 28375    0     0  34300      0 --:--:-- --:--:-- --:--:-- 34300
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with b2sums...
    python-hid-parser-0.0.3.tar.gz ... Passed
:: (1/1) Parsing SRCINFO: python-hid-parser
==> Making package: python-hid-parser 0.0.3-2 (Mon 08 Apr 2024 11:00:52 AM PDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found python-hid-parser-0.0.3.tar.gz
==> Validating source files with b2sums...
    python-hid-parser-0.0.3.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting python-hid-parser-0.0.3.tar.gz with bsdtar
==> Sources are ready.
==> Making package: python-hid-parser 0.0.3-2 (Mon 08 Apr 2024 11:00:53 AM PDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
* Getting build dependencies for wheel...
running egg_info
creating hid_parser.egg-info
writing hid_parser.egg-info/PKG-INFO
writing dependency_links to hid_parser.egg-info/dependency_links.txt
writing requirements to hid_parser.egg-info/requires.txt
writing top-level names to hid_parser.egg-info/top_level.txt
writing manifest file 'hid_parser.egg-info/SOURCES.txt'
reading manifest file 'hid_parser.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'hid_parser.egg-info/SOURCES.txt'
* Building wheel...
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/hid_parser
copying hid_parser/__init__.py -> build/lib/hid_parser
copying hid_parser/data.py -> build/lib/hid_parser
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/hid_parser
copying build/lib/hid_parser/__init__.py -> build/bdist.linux-x86_64/wheel/hid_parser
copying build/lib/hid_parser/data.py -> build/bdist.linux-x86_64/wheel/hid_parser
running install_egg_info
running egg_info
writing hid_parser.egg-info/PKG-INFO
writing dependency_links to hid_parser.egg-info/dependency_links.txt
writing requirements to hid_parser.egg-info/requires.txt
writing top-level names to hid_parser.egg-info/top_level.txt
reading manifest file 'hid_parser.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'hid_parser.egg-info/SOURCES.txt'
Copying hid_parser.egg-info to build/bdist.linux-x86_64/wheel/hid_parser-0.0.3-py3.11.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/hid_parser-0.0.3.dist-info/WHEEL
creating '/home/portablealgebra/.cache/yay/python-hid-parser/src/python-hid-parser-0.0.3/dist/.tmp-0o9zbbh5/hid_parser-0.0.3-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'hid_parser/__init__.py'
adding 'hid_parser/data.py'
adding 'hid_parser-0.0.3.dist-info/LICENSE'
adding 'hid_parser-0.0.3.dist-info/METADATA'
adding 'hid_parser-0.0.3.dist-info/WHEEL'
adding 'hid_parser-0.0.3.dist-info/top_level.txt'
adding 'hid_parser-0.0.3.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built hid_parser-0.0.3-py3-none-any.whl
==> Starting check()...
=================================================================== test session starts ====================================================================
platform linux -- Python 3.11.8, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/portablealgebra/.cache/yay/python-hid-parser/src/python-hid-parser-0.0.3
configfile: pyproject.toml
plugins: typeguard-4.2.1, hypothesis-6.100.0
collected 73 items                                                                                                                                         

tests/test_data.py ..........                                                                                                                        [ 13%]
tests/test_items.py .....F..F                                                                                                                        [ 26%]
tests/test_parse.py ............                                                                                                                     [ 42%]
tests/test_print.py ..                                                                                                                               [ 45%]
tests/test_repr.py ....................                                                                                                              [ 72%]
tests/test_usage.py ......                                                                                                                           [ 80%]
tests/test_util.py ..............                                                                                                                    [100%]

========================================================================= FAILURES =========================================================================
_______________________________________________________________ test_variableitem_compliance _______________________________________________________________

    def test_variableitem_compliance():
        with pytest.warns(hid_parser.HIDComplianceWarning):
            hid_parser.VariableItem(1, 2, 0, hid_parser.Usage(0x0001, 0x0001), -1, 1)

>       with pytest.warns(None):

tests/test_items.py:132: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = WarningsChecker(record=True), expected_warning = None, match_expr = None

    def __init__(
        self,
        expected_warning: Union[Type[Warning], Tuple[Type[Warning], ...]] = Warning,
        match_expr: Optional[Union[str, Pattern[str]]] = None,
        *,
        _ispytest: bool = False,
    ) -> None:
        check_ispytest(_ispytest)
        super().__init__(_ispytest=True)

        msg = "exceptions must be derived from Warning, not %s"
        if isinstance(expected_warning, tuple):
            for exc in expected_warning:
                if not issubclass(exc, Warning):
                    raise TypeError(msg % type(exc))
            expected_warning_tup = expected_warning
        elif isinstance(expected_warning, type) and issubclass(
            expected_warning, Warning
        ):
            expected_warning_tup = (expected_warning,)
        else:
>           raise TypeError(msg % type(expected_warning))
E           TypeError: exceptions must be derived from Warning, not <class 'NoneType'>

/usr/lib/python3.11/site-packages/_pytest/recwarn.py:285: TypeError
________________________________________________________________ test_arrayitem_compliance _________________________________________________________________

    def test_arrayitem_compliance():
        usages = [
            hid_parser.Usage(0x0001, 0x0030),
            hid_parser.Usage(0x0001, 0x0031),
        ]

        with pytest.warns(hid_parser.HIDComplianceWarning):
            hid_parser.ArrayItem(1, 2, 0, usages, -1, 1)

>       with pytest.warns(None):

tests/test_items.py:182: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = WarningsChecker(record=True), expected_warning = None, match_expr = None

    def __init__(
        self,
        expected_warning: Union[Type[Warning], Tuple[Type[Warning], ...]] = Warning,
        match_expr: Optional[Union[str, Pattern[str]]] = None,
        *,
        _ispytest: bool = False,
    ) -> None:
        check_ispytest(_ispytest)
        super().__init__(_ispytest=True)

        msg = "exceptions must be derived from Warning, not %s"
        if isinstance(expected_warning, tuple):
            for exc in expected_warning:
                if not issubclass(exc, Warning):
                    raise TypeError(msg % type(exc))
            expected_warning_tup = expected_warning
        elif isinstance(expected_warning, type) and issubclass(
            expected_warning, Warning
        ):
            expected_warning_tup = (expected_warning,)
        else:
>           raise TypeError(msg % type(expected_warning))
E           TypeError: exceptions must be derived from Warning, not <class 'NoneType'>

/usr/lib/python3.11/site-packages/_pytest/recwarn.py:285: TypeError
===================================================================== warnings summary =====================================================================
tests/test_items.py::test_arrayitem
tests/test_items.py::test_arrayitem_repr
  /home/portablealgebra/.cache/yay/python-hid-parser/src/python-hid-parser-0.0.3/hid_parser/__init__.py:373: HIDComplianceWarning: Usage(page=Generic Desktop Controls, usage=X) has no compatible usage types with an array item
    warnings.warn(HIDComplianceWarning(

tests/test_items.py::test_arrayitem
tests/test_items.py::test_arrayitem_repr
  /home/portablealgebra/.cache/yay/python-hid-parser/src/python-hid-parser-0.0.3/hid_parser/__init__.py:373: HIDComplianceWarning: Usage(page=Generic Desktop Controls, usage=Y) has no compatible usage types with an array item
    warnings.warn(HIDComplianceWarning(

tests/test_parse.py::test_parse[rdesc1]
tests/test_parse.py::test_size[rdesc1-1-56]
tests/test_parse.py::test_size[rdesc2-2-64]
tests/test_parse.py::test_size[rdesc3-16-48]
tests/test_parse.py::test_size[rdesc4-17-152]
tests/test_parse.py::test_size[rdesc5-32-112]
tests/test_parse.py::test_size[rdesc6-33-248]
tests/test_parse.py::test_linux_hidpp_items
tests/test_print.py::test_print[rdesc_raw1-linux-hidpp-print.txt]
  /home/portablealgebra/.cache/yay/python-hid-parser/src/python-hid-parser-0.0.3/hid_parser/__init__.py:373: HIDComplianceWarning: Usage(page=Keyboard/Keypad, usage=Keypad Hexadecimal) has no compatible usage types with an array item
    warnings.warn(HIDComplianceWarning(

tests/test_parse.py::test_parse[rdesc1]
tests/test_parse.py::test_size[rdesc1-1-56]
tests/test_parse.py::test_size[rdesc2-2-64]
tests/test_parse.py::test_size[rdesc3-16-48]
tests/test_parse.py::test_size[rdesc4-17-152]
tests/test_parse.py::test_size[rdesc5-32-112]
tests/test_parse.py::test_size[rdesc6-33-248]
tests/test_parse.py::test_linux_hidpp_items
tests/test_print.py::test_print[rdesc_raw1-linux-hidpp-print.txt]
  /home/portablealgebra/.cache/yay/python-hid-parser/src/python-hid-parser-0.0.3/hid_parser/__init__.py:373: HIDComplianceWarning: Usage(page=Keyboard/Keypad, usage=Keyboard LeftControl) has no compatible usage types with an array item
    warnings.warn(HIDComplianceWarning(

tests/test_parse.py::test_parse[rdesc1]
tests/test_parse.py::test_size[rdesc1-1-56]
tests/test_parse.py::test_size[rdesc2-2-64]
tests/test_parse.py::test_size[rdesc3-16-48]
tests/test_parse.py::test_size[rdesc4-17-152]
tests/test_parse.py::test_size[rdesc5-32-112]
tests/test_parse.py::test_size[rdesc6-33-248]
tests/test_parse.py::test_linux_hidpp_items
tests/test_print.py::test_print[rdesc_raw1-linux-hidpp-print.txt]
  /home/portablealgebra/.cache/yay/python-hid-parser/src/python-hid-parser-0.0.3/hid_parser/__init__.py:373: HIDComplianceWarning: Usage(page=Keyboard/Keypad, usage=Keyboard LeftShift) has no compatible usage types with an array item
    warnings.warn(HIDComplianceWarning(

tests/test_parse.py::test_parse[rdesc1]
tests/test_parse.py::test_size[rdesc1-1-56]
tests/test_parse.py::test_size[rdesc2-2-64]
tests/test_parse.py::test_size[rdesc3-16-48]
tests/test_parse.py::test_size[rdesc4-17-152]
tests/test_parse.py::test_size[rdesc5-32-112]
tests/test_parse.py::test_size[rdesc6-33-248]
tests/test_parse.py::test_linux_hidpp_items
tests/test_print.py::test_print[rdesc_raw1-linux-hidpp-print.txt]
  /home/portablealgebra/.cache/yay/python-hid-parser/src/python-hid-parser-0.0.3/hid_parser/__init__.py:373: HIDComplianceWarning: Usage(page=Keyboard/Keypad, usage=Keyboard LeftAlt) has no compatible usage types with an array item
    warnings.warn(HIDComplianceWarning(

tests/test_parse.py::test_parse[rdesc1]
tests/test_parse.py::test_size[rdesc1-1-56]
tests/test_parse.py::test_size[rdesc2-2-64]
tests/test_parse.py::test_size[rdesc3-16-48]
tests/test_parse.py::test_size[rdesc4-17-152]
tests/test_parse.py::test_size[rdesc5-32-112]
tests/test_parse.py::test_size[rdesc6-33-248]
tests/test_parse.py::test_linux_hidpp_items
tests/test_print.py::test_print[rdesc_raw1-linux-hidpp-print.txt]
  /home/portablealgebra/.cache/yay/python-hid-parser/src/python-hid-parser-0.0.3/hid_parser/__init__.py:373: HIDComplianceWarning: Usage(page=Keyboard/Keypad, usage=Keyboard Left GUI) has no compatible usage types with an array item
    warnings.warn(HIDComplianceWarning(

tests/test_parse.py::test_parse[rdesc1]
tests/test_parse.py::test_size[rdesc1-1-56]
tests/test_parse.py::test_size[rdesc2-2-64]
tests/test_parse.py::test_size[rdesc3-16-48]
tests/test_parse.py::test_size[rdesc4-17-152]
tests/test_parse.py::test_size[rdesc5-32-112]
tests/test_parse.py::test_size[rdesc6-33-248]
tests/test_parse.py::test_linux_hidpp_items
tests/test_print.py::test_print[rdesc_raw1-linux-hidpp-print.txt]
  /home/portablealgebra/.cache/yay/python-hid-parser/src/python-hid-parser-0.0.3/hid_parser/__init__.py:373: HIDComplianceWarning: Usage(page=Keyboard/Keypad, usage=Keyboard RightControl) has no compatible usage types with an array item
    warnings.warn(HIDComplianceWarning(

tests/test_parse.py::test_parse[rdesc1]
tests/test_parse.py::test_size[rdesc1-1-56]
tests/test_parse.py::test_size[rdesc2-2-64]
tests/test_parse.py::test_size[rdesc3-16-48]
tests/test_parse.py::test_size[rdesc4-17-152]
tests/test_parse.py::test_size[rdesc5-32-112]
tests/test_parse.py::test_size[rdesc6-33-248]
tests/test_parse.py::test_linux_hidpp_items
tests/test_print.py::test_print[rdesc_raw1-linux-hidpp-print.txt]
  /home/portablealgebra/.cache/yay/python-hid-parser/src/python-hid-parser-0.0.3/hid_parser/__init__.py:373: HIDComplianceWarning: Usage(page=Keyboard/Keypad, usage=Keyboard RightShift) has no compatible usage types with an array item
    warnings.warn(HIDComplianceWarning(

tests/test_parse.py::test_parse[rdesc1]
tests/test_parse.py::test_size[rdesc1-1-56]
tests/test_parse.py::test_size[rdesc2-2-64]
tests/test_parse.py::test_size[rdesc3-16-48]
tests/test_parse.py::test_size[rdesc4-17-152]
tests/test_parse.py::test_size[rdesc5-32-112]
tests/test_parse.py::test_size[rdesc6-33-248]
tests/test_parse.py::test_linux_hidpp_items
tests/test_print.py::test_print[rdesc_raw1-linux-hidpp-print.txt]
  /home/portablealgebra/.cache/yay/python-hid-parser/src/python-hid-parser-0.0.3/hid_parser/__init__.py:373: HIDComplianceWarning: Usage(page=Keyboard/Keypad, usage=Keyboard RightAlt) has no compatible usage types with an array item
    warnings.warn(HIDComplianceWarning(

tests/test_parse.py::test_parse[rdesc1]
tests/test_parse.py::test_size[rdesc1-1-56]
tests/test_parse.py::test_size[rdesc2-2-64]
tests/test_parse.py::test_size[rdesc3-16-48]
tests/test_parse.py::test_size[rdesc4-17-152]
tests/test_parse.py::test_size[rdesc5-32-112]
tests/test_parse.py::test_size[rdesc6-33-248]
tests/test_parse.py::test_linux_hidpp_items
tests/test_print.py::test_print[rdesc_raw1-linux-hidpp-print.txt]
  /home/portablealgebra/.cache/yay/python-hid-parser/src/python-hid-parser-0.0.3/hid_parser/__init__.py:373: HIDComplianceWarning: Usage(page=Keyboard/Keypad, usage=Keyboard Right GUI) has no compatible usage types with an array item
    warnings.warn(HIDComplianceWarning(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================= short test summary info ==================================================================
FAILED tests/test_items.py::test_variableitem_compliance - TypeError: exceptions must be derived from Warning, not <class 'NoneType'>
FAILED tests/test_items.py::test_arrayitem_compliance - TypeError: exceptions must be derived from Warning, not <class 'NoneType'>
======================================================== 2 failed, 71 passed, 85 warnings in 0.64s =========================================================
==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: python-hid-parser-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
python-hid-parser - exit status 4


vinicentus commented on 2024-04-08 11:50 (UTC) (edited on 2024-04-08 12:08 (UTC) by vinicentus)

@alllexx88 Ah, I see. I didn't notice that it was building an old version. I guess the version discrepancy in the two files temporarily breaks updates through aur helpers and requires manual intervention :D. I fixed it by removing ~/.cache/paru/clone/python-hid-parser/. The latest version builds and installs correctly.

alllexx88 commented on 2024-04-08 10:32 (UTC) (edited on 2024-04-08 10:32 (UTC) by alllexx88)

@vinicentus that's the error message of the old version, before the patch (see also the ==> Making package: python-hid-parser 0.0.3-2 part from old wrong PKGBUILD -- it's 0.0.3-3 now). You need to clean paru cache, it's under ~/.cache/paru I think, but not sure where's the actual package repo is cloned to (I use yay, it's ~/.cache/yay/python-hid-parser for yay). You're probably having this issue, because previously .SRCINFO stated version 0.0.3-3 and PKGBUILD had 0.0.3-2, so paru probably only checks the .SRCINFO version which hasn't changed.