Conversation
Replace asyncio.TaskGroup (Python 3.11+) in tests/test_notifier.py with asyncio.ensure_future and asyncio.gather, which are compatible with Python 3.10. Update requires-python in pyproject.toml and add 3.10 to the CI test matrix. Co-authored-by: Cursor <cursoragent@cursor.com>
- Lower examples/*/pyproject.toml requires-python to >=3.10 so the workspace lockfile resolves on 3.10 (uv unifies requires-python across workspace members; any member at >=3.11 forces the lock to refuse 3.10). Example sources still target 3.11+ at runtime; they are not installed or type-checked on the 3.10 CI lane. - ci.yml: on the 3.10 matrix entry, sync without --all-packages and run pyright scoped to fishjam/ so the 3.11+ examples never reach the 3.10 venv. 3.11+ lanes are unchanged. - tests/test_notifier.py: wrap each async test in try/finally with asyncio.gather(*, return_exceptions=True) so background tasks are always cancelled and awaited, restoring the auto-cleanup semantics asyncio.TaskGroup provided. Replace the inconsistent try/except CancelledError pattern in two tests. - uv.lock regenerated against the new workspace constraint.
asyncio.timeout is 3.11+. After task.cancel(), awaiting the task raises CancelledError once cancellation propagates; suppressing it is equivalent to the previous TimeoutError-via-timeout(0) idiom and works on 3.10.
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.
Description
Describe your changes.
Motivation and Context
Why is this change required? What problem does it solve? If it fixes an open
issue, please link to the issue here.
Documentation impact
Types of changes
not work as expected)