In this copr repo, I have updated pytest to 7.0.1: https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7/ Based on this PR: https://src.fedoraproject.org/rpms/pytest/pull-request/25 I'd like to update pytest to 7 in Fedora 37, but python-dateutil 1:2.8.1-8 fails to build. https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7/package/python-dateutil/ =================================== FAILURES =================================== _____________________ test_parser_parser_private_not_warns _____________________ @pytest.mark.skipif(IS_PY32, reason='pytest.warns not supported on Python 3.2') def test_parser_parser_private_not_warns(): from dateutil.parser._parser import _timelex, _tzparser from dateutil.parser._parser import _parsetz > with pytest.warns(None) as recorder: dateutil/test/test_internals.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = WarningsChecker(record=True), expected_warning = None, match_expr = None def __init__( self, expected_warning: Optional[ 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 expected_warning is None: > warnings.warn(WARNS_NONE_ARG, stacklevel=4) E pytest.PytestRemovedIn8Warning: Passing None has been deprecated. E See https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests for alternatives in common use cases. /usr/lib/python3.10/site-packages/_pytest/recwarn.py:246: PytestRemovedIn8Warning =========================== short test summary info ============================ FAILED dateutil/test/test_internals.py::test_parser_parser_private_not_warns ============ 1 failed, 2009 passed, 47 skipped, 19 xfailed in 6.57s ============ This calls pytest.warns(None) which is not allowed see https://github.com/pytest-dev/pytest/issues/9002 There are several packages affected by this update, so I'd very much appreciate it if you could fix this failure. Please, check if your upstream hasn't already fixed it and backport the fix if possible. Report this failure to your upstream otherwise. If you need specific help, let me know. Thanks!
These tests were re-written for the current version of dateutil, 3.8.2[1]. I suspect that a simple upgrade to that version will resolve this issue, too. [1] https://github.com/dateutil/dateutil/commit/353c4af84add0a9ac47adc792867935fe631875f
Sorry, this is actually not fixed in 3.8.2. It is fixed in an unreleased commit, https://github.com/dateutil/dateutil/commit/2bdd63158b7f981fc6d70a869680451bdfd8d848.
The following PR should fix this and bug 1982169: https://src.fedoraproject.org/rpms/python-dateutil/pull-request/10
FEDORA-2022-2d8cecbf55 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-2d8cecbf55
FEDORA-2022-2d8cecbf55 has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.