{"action":"created","issue":{"url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/876","repository_url":"https://api.github.com/repos/KeepSafe/aiohttp","labels_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/876/labels{/name}","comments_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/876/comments","events_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/876/events","html_url":"https://github.com/KeepSafe/aiohttp/issues/876","id":154679146,"number":876,"title":"Use some components from werkzeug","user":{"login":"sametmax","id":1673950,"avatar_url":"https://avatars.githubusercontent.com/u/1673950?v=3","gravatar_id":"","url":"https://api.github.com/users/sametmax","html_url":"https://github.com/sametmax","followers_url":"https://api.github.com/users/sametmax/followers","following_url":"https://api.github.com/users/sametmax/following{/other_user}","gists_url":"https://api.github.com/users/sametmax/gists{/gist_id}","starred_url":"https://api.github.com/users/sametmax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sametmax/subscriptions","organizations_url":"https://api.github.com/users/sametmax/orgs","repos_url":"https://api.github.com/users/sametmax/repos","events_url":"https://api.github.com/users/sametmax/events{/privacy}","received_events_url":"https://api.github.com/users/sametmax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-13T10:14:55Z","updated_at":"2016-05-13T12:50:33Z","closed_at":null,"body":"aiohttp write its own components for things like routing, multidict, requests, etc.\r\n\r\nThose components, which are decoupled from any async workflow, exist, are rich and battle tested in the famous [werkzeug](http://werkzeug.pocoo.org). It would make sense to either:\r\n\r\n- use directly the components from werkzeug to benefit from their feature, stability and community;\r\n- allow to be able to swap internal components with werkzeug components to allow a better integration of aiohttp into other projects.\r\n\r\nBy working on [tygs](https://github.com/Tygs/tygs), we already doing a bit of this work in our project. Of course, it's hacky and requires some bypass because we have to bend aiohttp to do something it's not designed for. \r\n\r\nBesides, making some things swapable offer the potential to optionally provide optimized components later on such as [http-parser](http://magic.io/blog/uvloop-blazing-fast-python-networking/).\r\n\r\nWe are interested in working with your on the matter. \r\n"},"comment":{"url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/comments/219033718","html_url":"https://github.com/KeepSafe/aiohttp/issues/876#issuecomment-219033718","issue_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/876","id":219033718,"user":{"login":"sametmax","id":1673950,"avatar_url":"https://avatars.githubusercontent.com/u/1673950?v=3","gravatar_id":"","url":"https://api.github.com/users/sametmax","html_url":"https://github.com/sametmax","followers_url":"https://api.github.com/users/sametmax/followers","following_url":"https://api.github.com/users/sametmax/following{/other_user}","gists_url":"https://api.github.com/users/sametmax/gists{/gist_id}","starred_url":"https://api.github.com/users/sametmax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sametmax/subscriptions","organizations_url":"https://api.github.com/users/sametmax/orgs","repos_url":"https://api.github.com/users/sametmax/repos","events_url":"https://api.github.com/users/sametmax/events{/privacy}","received_events_url":"https://api.github.com/users/sametmax/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T12:50:33Z","updated_at":"2016-05-13T12:50:33Z","body":"If you don't want to integrate werzeug, the second solution still stands: making components swapable. We can work together to define clear and pluggable API so that somebody wanting to replace a piece of aiohttp can.\r\n\r\nIt's already possible, but it leads to some undesirable [hacks](https://github.com/Tygs/tygs/blob/master/src/tygs/components.py#L183).\r\n\r\nThis would have the additional benefit of allowing aiohttp to have a richer ecosystem and on the long run, help us to contribute upstream."}}