Uses pytest.warns(None) with was deprecated in pytest-7 and removed in pytest-8. pytest upstream says to replace with pytest.warns() _________________________________________________________________________________ test_api_deprecation_warning _________________________________________________________________________________ [gw7] linux -- Python 3.11.8 /var/tmp/portage/dev-python/aesara-2.9.3/work/aesara-2.9.3-python3_11/install/usr/bin/python3.11 def test_api_deprecation_warning(): # accessing through configdefaults.config is the new best practice > with pytest.warns(None): tests/test_config.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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'> __class__ = <class '_pytest.recwarn.WarningsChecker'> _ispytest = True expected_warning = None match_expr = None msg = 'exceptions must be derived from Warning, not %s' self = WarningsChecker(record=True) /usr/lib/python3.11/site-packages/_pytest/recwarn.py:285: TypeError Reproducible: Always
Created attachment 891011 [details] build.log and emerge --info