Skip to content

Upgrading pytest-asyncio 0.23 to 0.24

Breaking0.23.8 → 0.24.0Breaking1Deprecated1New2Changed1Fixed1

BreakingUpgrade verdict

1 breaking change.

  • Passing scope or loop_scope by position to the asyncio marker now fails; use keyword arguments instead.
  • The scope option on the asyncio marker is deprecated; use loop_scope instead, which does the same thing.
2 items need code or config changes
Breaking1
Raises an error when scope or loop_scope is passed as a positional argument to pytest.mark.asyncio.
pytest.mark.asyncioscopeloop_scope
Deprecated1
Deprecates the scope keyword argument to pytest.mark.asyncio in favor of loop_scope for consistency with pytest_asyncio.fixture.
pytest.mark.asyncioscopeloop_scopepytest_asyncio.fixture

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • removed: variable FixtureDef
  • changed: function fixture(fixture_function: FixtureFunction, *, scope: Union[_ScopeName, Callable[[str, Config], _ScopeName]]=…, params: Optional[Iterable[object]]=…, autouse: bool=…, ids: Union[Iterable[Union[str, float, int, bool, None]], Callable[[Any], Optional[object]], None]=…, name: Optional[str]=…) -> FixtureFunction | (fixture_function: None=…, *, scope: Union[_ScopeName, Callable[[str, Config],… → function fixture(fixture_function: FixtureFunction, *, scope: Union[_ScopeName, Callable[[str, Config], _ScopeName]]=…, loop_scope: Union[_ScopeName, None]=…, params: Optional[Iterable[object]]=…, autouse: bool=…, ids: Union[Iterable[Union[str, float, int, bool, None]], Callable[[Any], Optional[object]], None]=…, name: Optional[str]=…) -> FixtureFunction | (fixture_function: None=…, *, scope: Uni…
  • changed: function pytest_fixture_setup(fixturedef: FixtureDef) -> Generator[None, Any, None] → function pytest_fixture_setup(fixturedef: FixtureDef) -> Generator[None, pluggy.Result, None]
  • changed: function pytest_pycollect_makeitem_convert_async_functions_to_subclass(collector: Union[pytest.Module, pytest.Class], name: str, obj: object) -> Generator[None, Any, None] → function pytest_pycollect_makeitem_convert_async_functions_to_subclass(collector: Union[pytest.Module, pytest.Class], name: str, obj: object) -> Generator[None, pluggy.Result, None]