launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #05131
Storm bug: is_empty on SQLObject result sets
-
To:
Launchpad Community Development Team <launchpad-dev@xxxxxxxxxxxxxxxxxxx>
-
From:
Jeroen Vermeulen <jtv@xxxxxxxxxxxxx>
-
Date:
Tue, 12 Oct 2010 20:19:40 +0700
-
User-agent:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100922 Thunderbird/3.1.4
Brad discovered a nasty bug in Storm's SQLObject compatibility layer
that you should be aware of. The is_empty method there inverts its
result: it returns False for an empty result and True for a nonempty
one. Storm's native is_empty does not have this problem.
He also found that fixing this would break __nonzero__ on the same
class, which compensated for the bug by not negating is_empty's result.
After much hard work and lengthy deliberation(*), we crafted an advanced
solution(**) which has now been reviewed and landed in lp:storm.
It'd be good to have this fix in Launchpad soon. The bug is here:
https://bugs.launchpad.net/storm/+bug/659078
Jeroen
(*) I may be exaggerating slightly.
(**) I'm definitely exaggerating.