[SQLObject] [PATCH] TypeError: unhashable instance using sqlbuilder.Table
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Leandro L. <ll...@gm...> - 2007-01-24 12:07:55
|
Oleg Broytmann, el 24 de enero a las 10:23 me escribiste: > On Tue, Jan 23, 2007 at 07:24:42PM -0300, Leandro Lucarella wrote: > > And tableDict[str(table)] = 1 is way too ugly, right? =) > > No, but someone has to patch SQLObject (and there are many places where > tableDict is used, including inheritance) and write tests. There are not that many places: trunk$ grep tablesDict -lr sqlobject/ | grep -v .svn | egrep -v '\.pyc$' sqlobject/inheritance/__init__.py sqlobject/sresults.py Patch attached, but I don't know what kind of testing do you want. I couldn't even run the current tests because I can't get py.test right now, but I've tried the example on the bug report and worked =) Things like tablesDict[sourceClass.sqlmeta.table] = 1 were patched too just in case in the future sqlmeta.table becomes a Table ;) There is another patch that converts tables.*Dict to tables.*Set. This patch requires Python 2.3 but AFAIK Python 2.2 support was dropped in 0.8 so this should'n be an issue. Both pathes are provided against 0.8 branch and trunk. The "set" patches includes the other (the "str" one). -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ .------------------------------------------------------------------------, \ GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05 / '--------------------------------------------------------------------' Karma police arrest this girl, her Hitler hairdo is making me feel ill and we have crashed her party. |