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.
Initial Quart Subscription Support #3818
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
base: main
Are you sure you want to change the base?
Initial Quart Subscription Support #3818
Changes from 4 commits
b4e4668
b61023d
b01e134
d3384b8
7e75108
f8b192c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 84 in strawberry/quart/views.py
strawberry/quart/views.py#L84
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.
Ideally, we would adjust these types to include
quart.Websocket
and makecreate_websocket_response
returnwebsocket
etc. so that we end up with sound types.That being said, I recognize
quart
loves their global context vars, so we could go withNone
here too. In that caseget_context
might need an update, since it's currently just using the return value fromcreate_websocket_response
which isNone
.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.
Yeah, I wasn't quite sure how to approach this exactly because of the context vars, But once the tests are all passing, we can take a look at cleaning this up.
Check warning on line 194 in strawberry/quart/views.py
strawberry/quart/views.py#L194
Check warning on line 228 in strawberry/quart/views.py
strawberry/quart/views.py#L227-L228
Check warning on line 232 in strawberry/quart/views.py
strawberry/quart/views.py#L232
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.
I think I'd prefer if we left it up to the user to register the two URL rules. The examples in our docs for adding HTTP/WS/HTTP+WS URL rules would then end up looking more consistent.
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.
This is more of a convenience method, but if you think that just documenting it is good enough, then I'm fine to remove it. Code that doesn't exist doesn't have any bugs :D
Check warning on line 235 in tests/http/clients/quart.py
tests/http/clients/quart.py#L234-L235
Check warning on line 237 in tests/http/clients/quart.py
tests/http/clients/quart.py#L237
Check warning on line 261 in tests/http/clients/quart.py
tests/http/clients/quart.py#L261
Check warning on line 271 in tests/http/clients/quart.py
tests/http/clients/quart.py#L271