Storm crashes on recent psycopg2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I installed Storm (0.19) and Psycopg2 (2.5) in a virtualenv. This causes the following issue:
hstorm.py:
from storm.locals import *
db = create_
store = Store(db)
When running I get this error.
(hstorm)
Traceback (most recent call last):
File "hstorm.py", line 3, in <module>
db = create_
File "/home/
None, None, [""])
File "/home/
install_
File "/home/
module_
TypeError: can't set attributes of built-in/extension type 'psycopg2.Error'
Downgrading to version 2.4.6 from 12th December 2012 rids me of this error. It seems 2.5 was released on 7th April 2013. Thank you for making this wonderful ORM!
Related branches
- Björn Tillenius (community): Approve
- Adam Collard (community): Approve
-
Diff: 29 lines (+9/-3)1 file modifiedstorm/exceptions.py (+9/-3)
- Simon Poirier (community): Approve
-
Diff: 423 lines (+228/-31)6 files modifiedNEWS (+4/-0)
storm/database.py (+132/-1)
storm/databases/postgres.py (+28/-7)
storm/databases/sqlite.py (+15/-9)
storm/exceptions.py (+46/-14)
tests/database.py (+3/-0)
no longer affects: | mailman |
Changed in storm: | |
status: | New → Confirmed |
Changed in storm: | |
status: | Confirmed → Fix Committed |
Changed in storm: | |
milestone: | none → 0.21 |
Changed in storm: | |
status: | Fix Committed → Fix Released |
As far as I can see there is a single error handler for storm.exception s.Error in Connection. rollback( ). As a workaround it should be fine to check for a general Exception on rollback instead (similar to commits) and to exclude storm.exception s.Error from the sequence of errors set as base classes of the psycopg2 exceptions in install_ exceptions( ).