Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-10 Thread Ihar Hrachyshka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 09/10/14 21:29, Mike Bayer wrote: So so far, everyone seems really positive and psyched about the proposal. It looks like providing some options for how to use would be best, that is provide decorators and context managers. Now the thing

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-10 Thread Mike Bayer
On Oct 10, 2014, at 6:13 AM, Ihar Hrachyshka ihrac...@redhat.com wrote: Signed PGP part On 09/10/14 21:29, Mike Bayer wrote: So so far, everyone seems really positive and psyched about the proposal. It looks like providing some options for how to use would be best, that is provide

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-10 Thread Mike Bayer
On Oct 10, 2014, at 11:41 AM, Mike Bayer mba...@redhat.com wrote: I’ve been asking a lot about “hey are people cool with thread locals?” and have been waiting for what the concerns are. Since I wrote that email I’ve shifted, and I’ve been considering only: @sql.reader def

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-10 Thread Joshua Harlow
On Oct 10, 2014, at 3:13 AM, Ihar Hrachyshka ihrac...@redhat.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 09/10/14 21:29, Mike Bayer wrote: So so far, everyone seems really positive and psyched about the proposal. It looks like providing some options for how to use

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-10 Thread Ihar Hrachyshka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 10/10/14 20:21, Joshua Harlow wrote: On Oct 10, 2014, at 3:13 AM, Ihar Hrachyshka ihrac...@redhat.com wrote: On 09/10/14 21:29, Mike Bayer wrote: So so far, everyone seems really positive and psyched about the proposal. It looks like

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-10 Thread Joshua Harlow
On Oct 10, 2014, at 12:52 PM, Ihar Hrachyshka ihrac...@redhat.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 10/10/14 20:21, Joshua Harlow wrote: On Oct 10, 2014, at 3:13 AM, Ihar Hrachyshka ihrac...@redhat.com wrote: On 09/10/14 21:29, Mike Bayer wrote: So so far,

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-09 Thread Roman Podoliaka
Hi Mike, Great stuff! Fixing the mess with transactions and their scope is probably one of the most important tasks for us, IMO. I look forward for this to be implemented in oslo.db and consuming projects! Thanks, Roman On Thu, Oct 9, 2014 at 12:07 AM, Mike Bayer mba...@redhat.com wrote: Hi

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-09 Thread Mike Bayer
So so far, everyone seems really positive and psyched about the proposal. It looks like providing some options for how to use would be best, that is provide decorators and context managers. Now the thing with the context manager, it can be as I stated: with sql.reader() as session: or