Pytest-asyncio deprecated the scope keyword argument of the asyncio marker in favor of loop_scope back in 2024 (commit a40333a). Passing scope=... to @pytest.mark.asyncio currently emits a PytestDeprecationWarning and is silently treated as loop_scope.
The goal of this issue is to follow through with the deprecation and convert the warning into an error, consistent with #1202 and #924.
This is a breaking change that involves a major version bump to pytest-asyncio.
For reference, the relevant code lives in _parse_asyncio_marker (pytest_asyncio/plugin.py), and the behavior is currently covered in tests/markers/test_function_scope.py. The duplicate scope + loop_scope case already raises UsageError, so the error path is partially in place.
Would this fit into the v2.0 milestone alongside the other deprecation follow-throughs? If so, I'd be happy to pick it up.
Pytest-asyncio deprecated the
scopekeyword argument of theasynciomarker in favor ofloop_scopeback in 2024 (commit a40333a). Passingscope=...to@pytest.mark.asynciocurrently emits aPytestDeprecationWarningand is silently treated asloop_scope.The goal of this issue is to follow through with the deprecation and convert the warning into an error, consistent with #1202 and #924.
This is a breaking change that involves a major version bump to pytest-asyncio.
For reference, the relevant code lives in
_parse_asyncio_marker(pytest_asyncio/plugin.py), and the behavior is currently covered intests/markers/test_function_scope.py. The duplicatescope+loop_scopecase already raisesUsageError, so the error path is partially in place.Would this fit into the v2.0 milestone alongside the other deprecation follow-throughs? If so, I'd be happy to pick it up.