Clear the warnings the check workflow prints - #726
Draft
owenpearson wants to merge 7 commits into
Draft
owenpearson wants to merge 7 commits into
owenpearson wants to merge 7 commits into
Conversation
When the transition or suspend timer ends a connection attempt, the
transport it was opening is disposed, but connect_base() is left
awaiting a future that only that transport's 'connected' or 'failed'
events settle. Neither fires once the transport is disposed, nor when
the attempt failed with an error ws_connect does not catch, so each such
attempt leaves a pending task for the garbage collector to destroy
("Task was destroyed but it is pending!"). An attempt abandoned while
still authenticating resumes when auth answers, and connects from
DISCONNECTED.
disconnect_transport() cancels the in-flight attempt alongside disposing
its transport, as close_impl() and on_closed() already do.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Logger.warn emits a DeprecationWarning. Replace the two remaining calls in the realtime channel and connection manager, and enable ruff's G010 rule so new ones are caught by lint. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The encoder tests patched Http.post with a bare AsyncMock, whose default return value is itself an AsyncMock. publish_messages calls the synchronous Response.to_native() on that value, which produced a coroutine that was never awaited and emitted a RuntimeWarning for each of the 11 tests. The patched post resolves to an empty 201 Response, so the response parsing in publish_messages runs as it does against a real server. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ng tests test_fail_on_disconnected_when_queue_messages_false and test_queue_on_disconnected_when_queue_messages_true forced DISCONNECTED while the transport was still connected. The immediate reconnect replaced the transport without closing it, so its websocket tasks were still pending when the test's event loop closed, and garbage collection later surfaced them as PytestUnraisableExceptionWarning in whichever test was running. Dispose the transport first, as the other simulated-disconnect tests do. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
checkout, setup-python, cache, upload-artifact and download-artifact were pinned to majors that target Node 20, which GitHub warns about and forces onto Node 24. Pin the latest majors, which run on Node 24 natively. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Python 3.14 deprecates asyncio.iscoroutinefunction, and the event emitter, Timer and is_callable_or_coroutine called it on every listener registration. is_coroutine_function keeps its semantics on every supported Python, including callables carrying asyncio's _is_coroutine marker (AsyncMock from the mock package, asgiref-marked callables), which inspect.iscoroutinefunction alone rejects. The fake clock awaits whatever its callback returns. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pytest-asyncio 0.23 calls asyncio.iscoroutinefunction and the event loop policy functions, producing ~710k warnings per 3.14 job. The releases that avoid them need Python 3.9 and pytest 8.2, so filter those three messages from the pytest_asyncio module only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch was successfully deployed
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.
Clears the warnings printed by the
checkworkflow. Stacked on #725.Changes
disconnect_transport()disposed the transport but leftconnect_base()awaiting a future that only that transport could settle. Each such attempt leaked a pending task, which surfaced as the 80–357Task was destroyed but it is pending!lines at the end of every job. An attempt abandoned mid-auth also resumed when auth answered and connected from DISCONNECTED.disconnect_transport()now cancels the in-flight attempt, asclose_impl()andon_closed()already do. Two regression tests are intest/unit/connectionmanager_test.py.Logger.warninginstead of the deprecatedLogger.warn. Two call sites, plus ruff'sG010rule so new ones fail lint.Response.encoders_test.pypatchedHttp.postwith a bareAsyncMock, sopublish_messages' synchronousto_native()call produced a never-awaited coroutine (11RuntimeWarnings) and the response parsing never ran.realtimechannel_publish_test.pyforced DISCONNECTED with the transport still live; the immediate reconnect orphaned the old websocket, whose coroutines were garbage-collected after the event loop closed (PytestUnraisableExceptionWarning).checkoutv7,setup-pythonv7,cachev6,upload-artifactv7,download-artifactv8.Testing
ruff checkpasses.pytest test/unit test/uts(Python 3.13): 1095 passed, noTask was destroyedlines (558 acrosstest/utsbefore).encoders_test.py, its generated sync mirror andrealtimechannel_publish_test.pywith-W error::RuntimeWarning: 138 passed, no unraisable or never-awaited warnings.setup-pythonv7, and the release workflow's artifact steps, which only run on release.🤖 Generated with Claude Code