-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add loop
argument to signal router finalize
method to finalize without having a running loop
#2830
base: main
Are you sure you want to change the base?
Add loop
argument to signal router finalize
method to finalize without having a running loop
#2830
Conversation
…thout having a running loop Closes sanic-org#2829
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😎 Nice. Thanks for raising the issue and making the fix.
I did not look at the reason for the failing tests, but I would guess it is a formatting thing.
There should be a command in the Makefile to run black across the repo.
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2830 +/- ##
=============================================
+ Coverage 88.387% 88.429% +0.041%
=============================================
Files 92 92
Lines 7156 7156
Branches 1228 1228
=============================================
+ Hits 6325 6328 +3
+ Misses 575 574 -1
+ Partials 256 254 -2
☔ View full report in Codecov by Sentry. |
@ahopkins I've updated the formatting and doc blocks, but a seemingly unrelated test is failing. Is this test perhaps also failing on main or do I need to dig deeper into the issue? |
I gather you should use asyncio to set the loop or otherwise execute within its normal bounds, rather than passing loop arguments. It is worth noting that asyncio itself just went though a removal of loop argument passing. |
@Tronic Do you object merging this and suggest injecting the loop differently? I'm happy to go a different route, but provided PR at least works fine in my use case (#2829). The failing test seems an artifact from a failing main branch test (https://github.com/sanic-org/sanic/actions/runs/6109680961/job/16624825220). @ahopkins Just as a sanity check, I can't see any uses of the |
Can you use |
Closes #2829