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)
- web_ws - Can't close tcp socket when receiving a close message from client. HOT 18
- Large payloads lead to BrokenPipe inside a request context manager HOT 1
- OSError : bind(): bad family HOT 1
- Error upon attempt to download https://dieunbestechlichen.com/feed HOT 3
- aiohttp 3.9.3 fails to install on Python 3.13.0a4 HOT 4
- aiohttp.web listens both TCP and Unix socket if `-U` has been supplied HOT 4
- TCPConnector / enable `limit_per_url` HOT 5
- Stability issues with gunicorn --max-requests HOT 11
- ClientSession cannot reuse connection pool HOT 4
- Using underscore to name a field in a named tuple HOT 2
- Request Pynacl Encryption Middleware HOT 13
- ASGI support HOT 4
- tests/test_pytest_plugin.py::test_aiohttp_plugin fails on Alpine Linux (python 3.11 and python 3.12) HOT 12
- ERROR: aiohttp has an invalid wheel, .dist-info directory 'yarl-1.9.4.dist-info' does not start with 'aiohttp' HOT 2
- Pass max_length parameter to ZLibDecompressor HOT 5
- "Unclosed client session" when initialization fails HOT 2
- Expired cookies not listed in the response cookies HOT 2
- Reserve generic property on app to store app state in a typed fashion HOT 1
- Please update llhttp to 9.2.1 HOT 7
- Using MultipartWriter.append_json breaks in 3.9.4 with AssertionError "assert CONTENT_DISPOSITION in payload.headers" HOT 8
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.