Skip to content
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

Remove loop as required listener arg #2414

Merged
merged 3 commits into from Mar 23, 2022
Merged

Remove loop as required listener arg #2414

merged 3 commits into from Mar 23, 2022

Conversation

ahopkins
Copy link
Member

The main change of this PR is to remove loop as a required argument for listeners. In most cases now, loop should not be necessary. Both of the following will be acceptable:

@app.before_server_start
async def without(app):
    ...

@app.before_server_start
async def with(app, loop):
    ...

@ahopkins ahopkins requested a review from a team as a code owner March 23, 2022 08:18
@codecov
Copy link

codecov bot commented Mar 23, 2022

Codecov Report

Merging #2414 (5f07ad5) into main (44b108b) will increase coverage by 0.077%.
The diff coverage is 100.000%.

@@              Coverage Diff              @@
##              main     #2414       +/-   ##
=============================================
+ Coverage   87.165%   87.243%   +0.077%     
=============================================
  Files           60        60               
  Lines         5010      5017        +7     
  Branches       904       904               
=============================================
+ Hits          4367      4377       +10     
+ Misses         470       468        -2     
+ Partials       173       172        -1     
Impacted Files Coverage Δ
sanic/mixins/runner.py 95.744% <ø> (ø)
sanic/app.py 89.728% <100.000%> (+0.060%) ⬆️
sanic/models/handler_types.py 100.000% <100.000%> (ø)
sanic/server/events.py 100.000% <100.000%> (ø)
sanic/server/protocols/http_protocol.py 88.095% <0.000%> (+3.571%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44b108b...5f07ad5. Read the comment docs.

@ahopkins ahopkins merged commit c9dbc8e into main Mar 23, 2022
@ahopkins ahopkins deleted the mpargs branch March 23, 2022 09:02
ChihweiLHBird pushed a commit to ChihweiLHBird/sanic that referenced this pull request Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant