Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 930169 - dev-python/aesara-2.9.3 fails tests with >=dev-python/pytest-8.0.0
Summary: dev-python/aesara-2.9.3 fails tests with >=dev-python/pytest-8.0.0
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 892183 pytest8
  Show dependency tree
 
Reported: 2024-04-17 19:12 UTC by matoro
Modified: 2024-04-17 19:13 UTC (History)
2 users (show)

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


Attachments
build.log and emerge --info (build.log.gz,205.93 KB, application/gzip)
2024-04-17 19:13 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2024-04-17 19:12:19 UTC
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
Comment 1 matoro archtester 2024-04-17 19:13:20 UTC
Created attachment 891011 [details]
build.log and emerge --info