column iteration regression
Bug #926278 reported by
srepmub
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Products.ZSQLMethods |
Invalid
|
Undecided
|
Unassigned |
Bug Description
we make use of column iteration in about a 1000 places in our code, but at some point between our current version of zope (very old, using python 2.4) and 2.13.9 (using python 2.7), the feature seems to have broken:
for row in context.test_sql():
for col in row:
print col
return printed
this now gives:
Exception Type AttributeError
Exception Value __iter__
I don't see another bug filed for this, as was discussed here:
http://
the program attached in this thread, which tests just Shared.
debug info is attached. this is for a clean zope install.
To post a comment you must log in.
I have no idea if this will break other things, but adding __iter__ here at least fixes my test case:
Products. ZSQLMethods- 2.13.4- py2.7.egg/ Shared/ DC/ZRDB/ Results. py:
class r(Record, Implicit, brains, zbrains):
'Result record class'
+ def __iter__(self):
+ return iter([self[i] for i in range(len(self))])