-
-
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
Get rid of email.Message, use MultiDict instead #62
Comments
+10 on this. |
@GMLudo please take a look on https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/multidict.py and feel free to blame if you will find the implementation doesn't satisfies your requirements. |
At first look, it's ok for me. |
@asvetlov do you work on this task? |
@fafhrd91 |
@asvetlov Probably HttpResponse class should not inherit from http.message.HttpMessage class. We can add 'headers' attribute to response, but we need case insensitive multidict |
@fafhrd91 do you really need for case insensitive one? |
I can implement CIMultiDict and CIMutableMultidict next Monday. Sorry, tomorrow I'll probably not have enough free time. |
I'll implement. And we need immutable only |
@fafhrd91 I agree with not inheriting HttpResponse from http.message.HttpMessage |
ok |
Also I worry a bit about several Request/Response classes. Ideally I would like to rename:
We can keep existing names as aliases to renamed classes. |
I like ClientRequest/Response but I don't like RequestImpl.— On Sat, Jun 7, 2014 at 12:12 PM, Andrew Svetlov notifications@github.com
|
Choose something what you like -- but keep in mind that after adding high level server API we'll need to distinguish current low-level server request/response and upcoming high-level ones. IIRC we have agreement that current server code will be saved (maybe with some minor changes) and we'll add high-level abstraction on top of current server code. |
fixed in @6d3050193d31a40e4236ad5e08f0a805aeb6fa06 |
I also would like to use MultiDict in server code. |
-1 right now. i need to see specs and concerns of ServerRequest/ServerResponse code first. let’s work on this later. On Jun 8, 2014, at 8:36 AM, Andrew Svetlov notifications@github.com wrote:
|
Ok. Thus we are ready for 0.8 release? |
Mostly ready, I need to fix logging bug, then I'll make release.— On Sun, Jun 8, 2014 at 9:48 AM, Andrew Svetlov notifications@github.com
|
i've decided to migrate to multidict while working on logging code |
Looks like great change! Thank you. |
In private conversation with @fafhrd91 we decided to get rid of using email.Message and switch to MultiDict for HTTP headers and so on.
email.Message handles HTTP headers well but pollutes public API with email specific methods which just doesn't works for aiohttp.
MultiDict implementation will be transplanted from aiorest library, which borrowed the class from WebOb with some cleanup.
The change will break backward compatibility, sorry, but it's strongly required to make aiohttp API clean and safe.
I hope the change will not make intolerable hurt for library users.
The text was updated successfully, but these errors were encountered: