Giter VIP home page Giter VIP logo

Comments (22)

ludovic-gasc avatar ludovic-gasc commented on May 11, 2024

+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.

asvetlov avatar asvetlov commented on May 11, 2024

@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.

ludovic-gasc avatar ludovic-gasc commented on May 11, 2024

At first look, it's ok for me.
I will test when it will be implemented in aiohttp classes.

from aiohttp.

fafhrd91 avatar fafhrd91 commented on May 11, 2024

@asvetlov do you work on this task?
I have some free time, I can integrate multidict.

from aiohttp.

asvetlov avatar asvetlov commented on May 11, 2024

@fafhrd91
I'll be busy for next two days, please feel free to move forward.

from aiohttp.

fafhrd91 avatar fafhrd91 commented on May 11, 2024

@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.

asvetlov avatar asvetlov commented on May 11, 2024

@fafhrd91 do you really need for case insensitive one?
Can just keeping upper-case header names satisfy your requirements?

from aiohttp.

asvetlov avatar asvetlov commented on May 11, 2024

I can implement CIMultiDict and CIMutableMultidict next Monday. Sorry, tomorrow I'll probably not have enough free time.

from aiohttp.

fafhrd91 avatar fafhrd91 commented on May 11, 2024

I'll implement. And we need immutable only

from aiohttp.

asvetlov avatar asvetlov commented on May 11, 2024

@fafhrd91 I agree with not inheriting HttpResponse from http.message.HttpMessage

from aiohttp.

asvetlov avatar asvetlov commented on May 11, 2024

ok

from aiohttp.

asvetlov avatar asvetlov commented on May 11, 2024

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.

fafhrd91 avatar fafhrd91 commented on May 11, 2024

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.
    We can keep existing names as aliases to renamed classes.
    Thoughts?

    Reply to this email directly or view it on GitHub:
    #62 (comment)

from aiohttp.

asvetlov avatar asvetlov commented on May 11, 2024

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.

fafhrd91 avatar fafhrd91 commented on May 11, 2024

fixed in @6d3050193d31a40e4236ad5e08f0a805aeb6fa06

from aiohttp.

asvetlov avatar asvetlov commented on May 11, 2024

I also would like to use MultiDict in server code.
@fafhrd91 do you have objections?

from aiohttp.

fafhrd91 avatar fafhrd91 commented on May 11, 2024

-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.

asvetlov avatar asvetlov commented on May 11, 2024

Ok. Thus we are ready for 0.8 release?

from aiohttp.

fafhrd91 avatar fafhrd91 commented on May 11, 2024

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.

fafhrd91 avatar fafhrd91 commented on May 11, 2024

i've decided to migrate to multidict while working on logging code

from aiohttp.

asvetlov avatar asvetlov commented on May 11, 2024

Looks like great change! Thank you.

from aiohttp.

lock avatar lock commented on May 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.