-
-
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 prop #213
Add prop #213
Conversation
that is valid reason and small change. i think PR is too heavy for that kind of things, just make change. |
Sounds reasonable for me. +1 |
+1 |
I assume +1's as lgtm. Thanks. P.S. Pull Requests is the best way even for proposals not ready for merging (if it's pointed directly). You can see proposed changes as diff at least. |
everything should be in moderation |
lgtm |
btw there is better api for start() method. start() method can return different object with write_xxx method. |
@fafhrd91 I don't follow. |
main problem right now, that we have two very different state encoded in one class. you can not use response as state2 response if it is in state1 and same for opposite. so obvious solution is just split those two states into different objects. but thats probably not best solution for python and in any case we already have stable api. |
Got it. On Mon, Dec 29, 2014 at 10:19 PM, Nikolay Kim notifications@github.com
Thanks, |
I guess to add
aiohttp.web.StreamResponse.started
property.It should be
False
if response has not started andTrue
whenresponse.start()
has been called.The reason is: in custom middleware I want to replace response object for, say, rendering pretty looking page for 500 status code.
But if response has been started (it's response for processing streaming video for example) I cannot do that.
Even catching
RuntimeError
from.start()
call cannot solve it if I want to replace the response, not modify it properties.Objections?
If not I'll prepare full PR with tests etc.