python-hid-parser fails to build with pytest 8. =================================== 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.12/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.12/site-packages/_pytest/recwarn.py:285: TypeError =========================== short test summary info ============================ FAILED tests/test_items.py::test_variableitem_compliance - TypeError: excepti... FAILED tests/test_items.py::test_arrayitem_compliance - TypeError: exceptions... ================== 2 failed, 71 passed, 85 warnings in 0.87s =================== https://docs.pytest.org/en/stable/changelog.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/thrnciar/pytest/fedora-rawhide-x86_64/07248187-python-hid-parser/ For all our attempts to build python-hid-parser with pytest 8, see: https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/package/python-hid-parser/ Let us know here if you have any questions. Pytest 8 is planned to be included in Fedora 41. And this bugzilla is a heads up before we merge new pytest into rawhide. For more info see a Fedora Change proposal https://fedoraproject.org/wiki/Changes/Pytest_8 We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
PR: https://src.fedoraproject.org/rpms/python-hid-parser/pull-request/1
This is fixed in rawhide.