-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
StreamResponse and Response implement MutableMapping interface #2494
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2494 +/- ##
==========================================
+ Coverage 97.08% 97.09% +<.01%
==========================================
Files 40 40
Lines 8141 8153 +12
Branches 1439 1439
==========================================
+ Hits 7904 7916 +12
Misses 100 100
Partials 137 137
Continue to review full report at Codecov.
|
aiohttp/web_response.py
Outdated
|
||
_length_check = True | ||
|
||
def __init__(self, *, status=200, reason=None, headers=None): | ||
def __init__(self, *, status=200, reason=None, headers=None, state=None): |
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.
Drop state
from accepted parameters.
Otherwise you should support it in all derived response classes like web.Response
.
I think the second is pointless and don't worth a new param,
@argaen ping |
Oops, will submit changes today :) |
updated |
Please add a couple sentences to |
Added, copied what was describe for |
Thanks! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
What do these changes do?
StreamResponse and Response are not MutableMappings
Are there changes in behavior for the user?
Now users can store data in the response object like
response['data'] = whatever
Related issue number
#2246
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bug)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.