On Tue, 14 Apr 2009 11:51:50 +0200 Morten Brekkevold morten.brekkevold@uninett.no wrote:
The custom cursor change affects the following subsystems:
- Arnold
- deviceManagement
- ipinfo
- l2trace
- lib-python (rrdPresenter)
- maintenance
- messages
- Netmap
- snmptrapd
- statTools
See this changeset to see how I may have mauled your code: http://metanav.uninett.no/hg/features/deprecate-psycopg1/rev/4cbc70349d55
Looks like I just found some breakage on my own, in the Netmap backend. datacollector.py assumes all results fetched from cursors are pure dicts, and attempts to modify them. DictRow objects do not support updating like a dictionary.
Also, DictRow objects use list semantics for the "in" operator: Checking for the existence of a key using "key in row" will fail, since this in reality checks the values of the row. datacollector.py does this too, and it causes it to crash on a failed assertion.
My quick workaround was to convert all result rows to regular dicts before they are used in datacollector.py, but I haven't committed these changes yet.
If any of you know of code that tries to update result row dictionaries, or check for the presence of specific keys in them using the 'in' operator, please give me a shout (or better yet, clone the deprecate-psycogp1 branch, write a patch and then give me shout)!