[DB-SIG] Context manager support for cursors

Mike Bayer mike_mp at zzzcomputing.com
Thu Jul 26 09:18:29 EDT 2018


On Thu, Jul 26, 2018 at 7:56 AM, Daniele Varrazzo
<daniele.varrazzo at gmail.com> wrote:
>
>> Python Database API Specification v3.0, anyone…? :-P
>
> In case there would be work in its direction, points to touch, on top
> of my mind (implemented in various way by different drivers) are also
> likely:
>
> - unicode support

yes


> - Python 3 support (likely it will be the only targeted version)

yes


> - async support

begrudgingly yes

> - multiprocess support

hmm, like sharing connections over processes?

> - green threads support

YES, now that we are to have a new BDFL perhaps green threads are
welcome again?

> - autocommit (was not-autocommit by default a good idea, even?)

Make real .autocommit a thing but please don't change the defaults....


> - should execute(query) with no param go for a round of placeholders
> escape on the string as it would execute(query, {})?

I think I know what issue you're talking about.    This seems much
more subtle of an issue than we would normally see in a pep-249 which
is overall very terse about each point.

> - placeholders style, of course...

one positional and one named and that's it  ....Annnnndddd:

- prepared statements

I don't recall if I was for or against this being in the spec.
Seems like something that should be clarified though.




>
>
> -- Daniele
> _______________________________________________
> DB-SIG maillist  -  DB-SIG at python.org
> https://mail.python.org/mailman/listinfo/db-sig


More information about the DB-SIG mailing list