-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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 runner.serve_forever() #7688
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7688 +/- ##
========================================
Coverage 97.36% 97.36%
========================================
Files 106 106
Lines 31541 31661 +120
Branches 3593 3625 +32
========================================
+ Hits 30709 30826 +117
- Misses 630 631 +1
- Partials 202 204 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Sorry for taking so long to look at this. I have a few questions about the implementation and expected behaviour:
|
:async: | ||
|
||
Wait forever. Make sure to call :meth:`setup` prior calling this method. | ||
Only one :meth:`serve_forever` task is allowed per one runner object. |
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.
Only one :meth:`serve_forever` task is allowed per one runner object. | |
Only one :meth:`serve_forever` task is allowed per runner object. |
runner = make_runner() | ||
task = loop.create_task(runner.serve_forever()) | ||
await asyncio.sleep(0.01) | ||
with pytest.raises(RuntimeError): |
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.
Can we use the match argument to match the text of the exception in these?
The codecov comment suggests this test isn't working correctly.
What do these changes do?
This is a continuation of work from #4378. I've dropped
cleanup
call onserve_forever()
task cancellationand updated the documentation accordingly.
Are there changes in behavior for the user?
No.
Related issue number
#2746
Original attempt from asvetlov: master...server_forever
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.