Skip to content

Conversation

@bbrowning
Copy link
Contributor

Fixes INTERNALERROR spam from pytest when run under unitcov - things like:

INTERNALERROR> pytest.PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
INTERNALERROR> The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

@bbrowning
Copy link
Contributor Author

This is needed to unblock the backport of #660 to our release-v0.8 branch, as well as to unblock updating our constraints in main via #659

@mergify mergify bot added ci-failure and removed ci-failure labels Jun 9, 2025
@bbrowning
Copy link
Contributor Author

bbrowning commented Jun 9, 2025

Ignore the e2e-medium failure - it ran out of disk space and we haven't merged the latest xfs retries (#655) to help that yet.

Fixes `INTERNALERROR` spam from pytest when run under unitcov - things
like:

```
INTERNALERROR> pytest.PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
INTERNALERROR> The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
```

Signed-off-by: Ben Browning <[email protected]>
@bbrowning bbrowning force-pushed the asyncio-pytest-fixture-default branch from e5fb33f to 2d5048a Compare June 9, 2025 19:19
@booxter
Copy link
Contributor

booxter commented Jun 9, 2025

The fix was applied in other repos. Merging with 1 vote to speed the fix up.

@booxter booxter merged commit cfde782 into instructlab:main Jun 9, 2025
21 of 23 checks passed
@mergify mergify bot added the one-approval label Jun 9, 2025
@bbrowning bbrowning deleted the asyncio-pytest-fixture-default branch June 9, 2025 19:47
@bbrowning
Copy link
Contributor Author

@Mergifyio backport release-v0.8

@mergify
Copy link
Contributor

mergify bot commented Jun 9, 2025

backport release-v0.8

✅ Backports have been created

bbrowning added a commit that referenced this pull request Jun 9, 2025
Default the pytest asyncio fixture loop scope (backport #662)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants