{"action":"created","issue":{"url":"https://api.github.com/repos/aio-libs/aiomysql/issues/13","labels_url":"https://api.github.com/repos/aio-libs/aiomysql/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/aio-libs/aiomysql/issues/13/comments","events_url":"https://api.github.com/repos/aio-libs/aiomysql/issues/13/events","html_url":"https://github.com/aio-libs/aiomysql/pull/13","id":73450977,"number":13,"title":"Fix result proxy close method","user":{"login":"jettify","id":223335,"avatar_url":"https://avatars.githubusercontent.com/u/223335?v=3","gravatar_id":"","url":"https://api.github.com/users/jettify","html_url":"https://github.com/jettify","followers_url":"https://api.github.com/users/jettify/followers","following_url":"https://api.github.com/users/jettify/following{/other_user}","gists_url":"https://api.github.com/users/jettify/gists{/gist_id}","starred_url":"https://api.github.com/users/jettify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jettify/subscriptions","organizations_url":"https://api.github.com/users/jettify/orgs","repos_url":"https://api.github.com/users/jettify/repos","events_url":"https://api.github.com/users/jettify/events{/privacy}","received_events_url":"https://api.github.com/users/jettify/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-05T22:25:57Z","updated_at":"2015-05-06T17:48:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aio-libs/aiomysql/pulls/13","html_url":"https://github.com/aio-libs/aiomysql/pull/13","diff_url":"https://github.com/aio-libs/aiomysql/pull/13.diff","patch_url":"https://github.com/aio-libs/aiomysql/pull/13.patch"},"body":"In ``ResultProxy`` class ``cursor.close()`` called without `` yield from`` since ``cursor.close`` is coroutine ``ResultProxy.close`` must be coroutine too. This PR fixes this issue and all warnings in travisci like:\r\n```\r\n<CoroWrapper Cursor.close() running at /home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/aiomysql/cursors.py:148, \r\ncreated at /home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/aiomysql/sa/result.py:322> was never yielded from\r\n```\r\nsee this [travis bulild]( https://travis-ci.org/aio-libs/aiomysql/jobs/60567222).\r\n\r\nBut I do not know proper way how to fix following line:\r\n```python\r\nself._weak = weakref.ref(self, lambda wr: cursor.close())\r\n```\r\nmay be with ``asyncio.Task``:\r\n```python\r\nself._weak = weakref.ref(self, lambda wr: asyncio.Task(cursor.close(), loop=self._loop))\r\n```\r\n??\r\n\r\nPlease review."},"comment":{"url":"https://api.github.com/repos/aio-libs/aiomysql/issues/comments/99551003","html_url":"https://github.com/aio-libs/aiomysql/pull/13#issuecomment-99551003","issue_url":"https://api.github.com/repos/aio-libs/aiomysql/issues/13","id":99551003,"user":{"login":"asvetlov","id":356399,"avatar_url":"https://avatars.githubusercontent.com/u/356399?v=3","gravatar_id":"","url":"https://api.github.com/users/asvetlov","html_url":"https://github.com/asvetlov","followers_url":"https://api.github.com/users/asvetlov/followers","following_url":"https://api.github.com/users/asvetlov/following{/other_user}","gists_url":"https://api.github.com/users/asvetlov/gists{/gist_id}","starred_url":"https://api.github.com/users/asvetlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asvetlov/subscriptions","organizations_url":"https://api.github.com/users/asvetlov/orgs","repos_url":"https://api.github.com/users/asvetlov/repos","events_url":"https://api.github.com/users/asvetlov/events{/privacy}","received_events_url":"https://api.github.com/users/asvetlov/received_events","type":"User","site_admin":false},"created_at":"2015-05-06T17:48:11Z","updated_at":"2015-05-06T17:48:11Z","body":"Hmm, interesting question. I don't know the best solution, new task may silently fail. But maybe you cannot invite something better."}}