Pool broken for ZPsycopgDA2? One year ago?

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема Pool broken for ZPsycopgDA2? One year ago?
Дата
Msg-id CA+mi_8ZopjeE0PM0+PxpAR=h6kAf4gn-fbCQVGN-Lmd4t4gH1A@mail.gmail.com
обсуждение исходный текст
Список psycopg
In a bug report open today [1] an user is reporting bad interaction
between an old version of zope and old version of psycopg2. But what
added is:

"""
I tried the newest version of psycopg2 and ZPsycopgDA2 (2.4.5): I get
a lot of rollbacks. I think because Zope doesn't commit select
statements or Zope only commits at the end of a page load. The
connection is meanwhile (between two ZSQLMethods) put back into the
pool and at putting it back idle transactions are rolled back (I think
ticket #69 [note: actually was #62] introduced this behaviour). So for
my little test case: If I just do the update or the select everything
works fine and I get a commit. If I do both in a dtml page I the first
one of them gets rolled back.
"""

[1] http://psycopg.lighthouseapp.com/projects/62710-psycopg/tickets/123

I don't know zope: modulo my limits I translated the above sentence to:

1. zope puts connections into the pool with open transaction: this is
totally what wanted and normal
2. fixing ticket #62 has broken ZPsycopgDA2
3. broken ZPsycopgDA2 has not been reported since the 2.4.3 release
*more than one year ago*.

Can anybody confirm the breakage in 1?

If zope is broken, would it be a solution to fix
PersistentConnectionPool._putconn not to rollback a connection in
transaction but still discard broken/closed ones?

Is there any hope to have some basic automated regression test for zope?

If the situation is what described above, given the lack of test and
of experience on my side, I just don't feel confident to claim psycopg
as compatible with zope. My idea is to fix the above bug, if present,
in psycopg 2.4.6 (to put zope user in condition to install the latest
2.4) but drop support for zope for psycopg 2.5.

Comments?

Thank you.

-- Daniele


В списке psycopg по дате отправления:

Предыдущее
От: Daniele Varrazzo
Дата:
Сообщение: Re: JSON type caster
Следующее
От: Daniele Varrazzo
Дата:
Сообщение: Re: Problem with Zope 2.13.15, python 2.6.6 psycopg2-2.4.5, pg 9.0.3