-
-
Notifications
You must be signed in to change notification settings - Fork 948
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
doc(asgi): Another round of doc updates, this time centered around Request/Response #1667
Conversation
I still need to double-check a few things but this is almost ready for review... |
Codecov Report
@@ Coverage Diff @@
## master #1667 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 47 47
Lines 3565 3568 +3
Branches 545 545
=========================================
+ Hits 3565 3568 +3 Continue to review full report at Codecov.
|
falcon/asgi/stream.py
Outdated
@@ -53,6 +108,7 @@ def __init__(self, receive, content_length=None): | |||
self._pos = 0 | |||
|
|||
def __aiter__(self): | |||
"""Hello""" |
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 you missed this
2321733
to
1f7f4c2
Compare
attribute on the :py:class:`~.Request` object. Generally speaking, the | ||
:py:meth:`~.Request.get_cookie_values` method should be used unless you need a | ||
collection of all the cookies in the request. | ||
:py:meth:`~.falcon.Request.get_cookie_values` method or the |
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 just fixed these up for now to resolve doc warnings, but I plan to circle back in all these places and sort out how to also point people to ASGI Request/Response docs.
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've just had a minor suggestion to improve SSEvent
, not directly related to this PR (that can be addressed elsewhere).
@@ -5,6 +5,60 @@ | |||
|
|||
|
|||
class SSEvent: |
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.
A finding not directly related to the proposed changeset, but there seems to be some asymmetry between parameter validation in the constructor and the serialize()
-ation function.
Passing a parameter that does not reduce to truth in a boolean test can go unnoticed in the up front check, e.g.:
>>> from falcon.asgi.structures import SSEvent
>>> event = SSEvent(text=0.0)
>>> event.serialize()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/vytas/progs/falcon/falcon/asgi/structures.py", line 85, in serialize
block += 'data: ' + self.text + '\n'
TypeError: can only concatenate str (not "float") to str
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 catch. I'll address this in a followup PR.
…quest/Response Partially-Implements: falconry#1358
ef1863f
to
0a291a9
Compare
Summary of Changes
Here's another round of ASGI-related doc improvements. This one centers mostly on things related to
Request
andResponse
.Related Issues
#1358