Comments (22)
+10 on this.
It was the first remark I've did myself when I've started to use aiohttp.
About Multidict implementation, I've found a lot in Python librairies, like in werkzeug, django, python-ldap...
from aiohttp.
@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.
from aiohttp.
At first look, it's ok for me.
I will test when it will be implemented in aiohttp classes.
from aiohttp.
@asvetlov do you work on this task?
I have some free time, I can integrate multidict.
from aiohttp.
@fafhrd91
I'll be busy for next two days, please feel free to move forward.
from aiohttp.
@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
from aiohttp.
@fafhrd91 do you really need for case insensitive one?
Can just keeping upper-case header names satisfy your requirements?
from aiohttp.
I can implement CIMultiDict and CIMutableMultidict next Monday. Sorry, tomorrow I'll probably not have enough free time.
from aiohttp.
I'll implement. And we need immutable only
from aiohttp.
@fafhrd91 I agree with not inheriting HttpResponse from http.message.HttpMessage
from aiohttp.
ok
from aiohttp.
Also I worry a bit about several Request/Response classes.
We have Response and HttpResponse for example.
High-level server API will need for own Request/Response pair (see aiorest).
That's a mess. Probably good documentation can help.
Ideally I would like to rename:
- HttpRequest/HttpResponse to ClientRequest/ClientResponse
- Request/Response to RequestImpl/ResponseImpl (they are part of low-level API)
- Upcoming high-level pair should be ServerRequest and ServerResponse.
We can keep existing names as aliases to renamed classes.
Thoughts?
from aiohttp.
I like ClientRequest/Response but I don't like RequestImpl.—
Sent from Mailbox
On Sat, Jun 7, 2014 at 12:12 PM, Andrew Svetlov [email protected]
wrote:
Also I worry a bit about several Request/Response classes.
We have Response and HttpResponse for example.
High-level server API will need for own Request/Response pair (see aiorest).
That's a mess. Probably good documentation can help.
Ideally I would like to rename:
- HttpRequest/HttpResponse to ClientRequest/ClientResponse
- Request/Response to RequestImpl/ResponseImpl (they are part of low-level API)
Upcoming high-level pair should be ServerRequest and ServerResponse.
Reply to this email directly or view it on GitHub:
We can keep existing names as aliases to renamed classes.
Thoughts?
#62 (comment)
from aiohttp.
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.
from aiohttp.
fixed in @6d3050193d31a40e4236ad5e08f0a805aeb6fa06
from aiohttp.
I also would like to use MultiDict in server code.
@fafhrd91 do you have objections?
from aiohttp.
-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 [email protected] wrote:
I also would like to use MultiDict in server code.
@fafhrd91 do you have objections?—
Reply to this email directly or view it on GitHub.
from aiohttp.
Ok. Thus we are ready for 0.8 release?
from aiohttp.
Mostly ready, I need to fix logging bug, then I'll make release.—
Sent from Mailbox
On Sun, Jun 8, 2014 at 9:48 AM, Andrew Svetlov [email protected]
wrote:
Ok. Thus we are ready for 0.8 release?
Reply to this email directly or view it on GitHub:
#62 (comment)
from aiohttp.
i've decided to migrate to multidict while working on logging code
from aiohttp.
Looks like great change! Thank you.
from aiohttp.
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.
If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.
from aiohttp.
Related Issues (20)
- The `timeout` parameter of `aiohttp.ClientSession` does work for types other than `Union[ClientTimeout, _SENTINEL, None]` HOT 5
- Analyze additional places where there is timer handle churn HOT 7
- Risk of websocket ping tasks being garbage collected before they finish HOT 1
- Remove wait_for_disconnection
- Remove `allowed_protocol_schema_set` backwards compat in `BaseConnector` HOT 1
- Multipart reader fails on Transfer-Encoding: chunked HOT 9
- pytest example in testing.rst throws TypeError: 'async_generator' object is not callable HOT 2
- Response object reference to session returns None HOT 2
- ClientResponse.json() doesn't set status code HOT 3
- [typing] mypy errors when trying to extract headers when type is `LooseHeaders` HOT 1
- Support free-threaded Python 3.13 build HOT 2
- TypeError: _patch_task.<locals>.task_new_init() got an unexpected keyword argument 'eager_start' HOT 5
- Sending default 'Server' header when failing on wrong HTTP method HOT 6
- Websocket ping test has transient failures on loaded systems HOT 1
- Send 100-continue only when handler reads body
- typing error with `timeout` argument of `aiohttp.ClientSession` requests methods HOT 1
- Rename compress parameter HOT 6
- on_request_headers_sent params type was never imported into the top-level file. HOT 2
- AsyncResolver not passing on loop too aiodns.DNSResolver HOT 4
- test_web_sendfile_functional isn't testing sendfile
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiohttp.