Re: Use of context managers with DB API 2

Daniele Varrazzo <[email protected]>
Newsgroups gmane.comp.python.db
Message-ID <CA+mi_8ZLVoP2crgkj+cnqprRQrXCg=-s8N4_ypeC7ERX78y=og@mail.gmail.com>
On Mon, Dec 3, 2012 at 9:01 AM, M.-A. Lemburg <[email protected]> wrote:
> On 03.12.2012 02:42, Daniele Varrazzo wrote:
>> On Mon, Nov 5, 2012 at 9:28 AM, M.-A. Lemburg <[email protected]> wrote:
>>> On 04.11.2012 23:24, Christoph Zwerschke wrote:
>>>> To wrap everything up, as a result of our discussion, I will do the following in the next version of
>>>> PyGreSQL:
>>>>
>>>> * make connections context managers for transactions
>>>>   (may not be the optimal solution, but it's already established)
>>>> * make cursors self-closing context managers (evident)
>>>> * not implement shortcut functions (see above)
>>>>
>>>> Is everybody happy with that?
>>>
>>> Sounds good :-)
>>
>> Is there a final wording for the context managers in the dbapi?
>
> No, not yet. I wanted to add some text, but got distracted by other
> things. I'll try to get around to it this week, unless someone beats
> me to it :-)

I'd just like to be sure that the version I've implemented (as
described here:
<https://github.com/dvarrazzo/psycopg/commit/c2f284cd3b7d3b33f4de348aaac62590feda8c78#L2R554>)
is conform to the specs or if it requires any tweak.

-- Daniele
_______________________________________________
DB-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/db-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.