Repository navigation
ci(pytest): set asyncio_default_fixture_loop_scope so pytest-asyncio 1.4.1 does not abort the suite - #150
Merged
GreenGrassBlueOcean merged 1 commit intoOct 28, 2026
Conversation
…1.4.1 does not abort the suite pytest-asyncio 1.4.1 emits PytestDeprecationWarning at configure time when asyncio_default_fixture_loop_scope is unset; with filterwarnings = error::DeprecationWarning that warning becomes an INTERNALERROR before any test is collected (exit code 3 in the Tests & Coverage jobs of every open PR since the release). The suite's async fixtures are all function-scoped, so the option is set to "function", which changes nothing at runtime. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
GreenGrassBlueOcean
self-requested a review
October 28, 2026 15:49
GreenGrassBlueOcean
approved these changes
Oct 28, 2026
GreenGrassBlueOcean
left a comment
Contributor
There was a problem hiding this comment.
Clean, minimal, and exact root-cause fix — thank you for jumping on this right away.
- Root cause verified:
pytest-asyncio >= 1.4.1emitsPytestDeprecationWarninginsidepytest_configurewhenasyncio_default_fixture_loop_scopeis unset, whichfilterwarnings = ["error::DeprecationWarning", ...]turns into anINTERNALERROR(exit code 3) before test collection across Python 3.11–3.14. - Fix verified: Every async fixture in the
OWNdsuite is function-scoped, so settingasyncio_default_fixture_loop_scope = "function"in[tool.pytest.ini_options]preserves exact runtime semantics without looseningDeprecationWarningenforcement. - Checks: All 8 CI checks (
Tests & Coverage3.11–3.14,Static analysis,Build package,Golden corpus & smoke gates, andMyHOME test suite) are green, single clean commit (00573dc3) directly onmaster.
LGTM — merging so #138, #142, #137, and #139 can rebase cleanly onto green master.
This was referenced Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by A
Before: since the pytest-asyncio 1.4.1 release, every
Tests & Coveragejob on every open OWNd PR aborts with exit code 3 before collecting a single test:INTERNALERROR> pytest.PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.The plugin now emits that warning inpytest_configure, andpyproject.tomlturnsDeprecationWarninginto an error.master's last green run (12fef0c, 2026-10-27 18:23) predates the release; its next run would fail the same way.After:
[tool.pytest.ini_options]setsasyncio_default_fixture_loop_scope = "function", the scope the suite has always used (every async fixture is function-scoped), so nothing changes at runtime and the suite runs again.Evidence
master12fef0c:python -m pytest tests -q→ the sameINTERNALERRORat configure; with this one line:2125 passed in 15.01s.ruff check .clean.pytest_asyncio/plugin.py, line 300,pytest_configure).Once this lands, the open PRs turn green on their next rebase (#137, #138, #142 are the ones currently red on this; #139's MyHOME-suite job is red by design,
pending_decoder_rx).🤖 Generated with Claude Code