Re: [DB-SIG] asyncio support

2013-11-12 Thread INADA Naoki
On Tue, Nov 12, 2013 at 7:41 PM, M.-A. Lemburg wrote: > On 11.11.2013 10:43, INADA Naoki wrote: > > I think having definition about what method returns Future is good. > > > > For example: > > > > con = yield from pymysql.connect_async(...) # connection may cause > > cur = con.cursor() # cursor

Re: [DB-SIG] asyncio support

2013-11-12 Thread M.-A. Lemburg
On 11.11.2013 10:43, INADA Naoki wrote: > I think having definition about what method returns Future is good. > > For example: > > con = yield from pymysql.connect_async(...) # connection may cause > cur = con.cursor() # cursor creation should done without asyncio > yield from cur.execute("..."

Re: [DB-SIG] asyncio support

2013-11-12 Thread Michael Bayer
On Nov 12, 2013, at 9:51 AM, M.-A. Lemburg wrote: > > For mxODBC Connect, we've implemented gevent compatibility, > so you can use async processing without having to change > your code - which IMHO is the nicest way to do async > processing :-) though sadly just doesn’t seem to be catching on,

Re: [DB-SIG] asyncio support

2013-11-12 Thread M.-A. Lemburg
On 12.11.2013 12:03, INADA Naoki wrote: > On Tue, Nov 12, 2013 at 7:41 PM, M.-A. Lemburg wrote: > >> On 11.11.2013 10:43, INADA Naoki wrote: >>> I think having definition about what method returns Future is good. >>> >>> For example: >>> >>> con = yield from pymysql.connect_async(...) # connecti

Re: [DB-SIG] asyncio support

2013-11-11 Thread INADA Naoki
I think having definition about what method returns Future is good. For example: con = yield from pymysql.connect_async(...) # connection may cause cur = con.cursor() # cursor creation should done without asyncio yield from cur.execute("...") # execute may use asyncio row = yield from cur.fetc

Re: [DB-SIG] asyncio support

2013-11-10 Thread Tony Locke
What sort of thing do you have in mind? Perhaps something where the execute() method returns immediately, and a callback function is called when the query is complete? This could be implemented in a library on top of DB-API. But should it be part of the spec? Cheers, Tony. On 25 October 2013 0

[DB-SIG] asyncio support

2013-10-27 Thread INADA Naoki
Does someone consider DB-API for asyncio? -- INADA Naoki ___ DB-SIG maillist - DB-SIG@python.org https://mail.python.org/mailman/listinfo/db-sig