Merge lp:~wgrant/storm/psycopg2-2.4-pgbouncer into lp:storm
Proposed by
William Grant
on 2012-04-05
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Merged at revision: | 445 | ||||
| Proposed branch: | lp:~wgrant/storm/psycopg2-2.4-pgbouncer | ||||
| Merge into: | lp:storm | ||||
| Diff against target: |
63 lines (+5/-19) 3 files modified
storm/databases/postgres.py (+4/-3) tests/databases/postgres.py (+1/-9) tests/helper.py (+0/-7) |
||||
| To merge this branch: | bzr merge lp:~wgrant/storm/psycopg2-2.4-pgbouncer | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Thomas Herve (community) | 2012-04-05 | Approve on 2012-04-27 | |
| Stuart Bishop | 2012-04-05 | Approve on 2012-04-05 | |
|
Review via email:
|
|||
Commit Message
Fix pgbouncer disconnect handling with psycopg2 2.4.
Description of the Change
Storm has a bit of a hack to catch and ignore a ProgrammingError raised by disconnection caused by pgbouncer shutdown. That works fine in oldish psycopg2 releases. But psycopg2 2.4 raises a plain DatabaseError, which propagates up and breaks tests and applications alike. This branch alters Storm to catch DatabaseError in general (ProgrammingError is a subclass), making it work in psycopg2 2.4 as well. I undisabled the relevant tests (they were being skipped when using 2.4 due to this bug). All tests pass on Lucid and Precise.
To post a comment you must log in.
| David Britton (davidpbritton) wrote : | # |
Confirmed tests passing on precise. great!

This looks good.