David Gardner wrote:
>
> Thanks for taking time on this one. That definitely fixes the problem. I
> entered it in as Ticket #1556.
> I am willing to write a test for this defect, but have no idea how to
> check for this other than to turn
> on engine.echo and spot it on the console.

oh its fine I can do it.   we have a testing style that is like this:

def go():
    eq_(query.all(), [Foo(), Bar(), Bat()])
self.assert_sql_count(testing.db, go, 0)

i.e. run go(), do the eq_() assertion, then when complete assert that 0
SQL statements were executed.






>> I have a theory what this is.  Can you try this patch against 0.5.6:
>>
>> Index: lib/sqlalchemy/sql/expression.py
>> ===================================================================
>> --- lib/sqlalchemy/sql/expression.py    (revision 6377)
>> +++ lib/sqlalchemy/sql/expression.py    (working copy)
>> @@ -2011,7 +2011,11 @@
>>          the same type.
>>
>>          """
>> -        return isinstance(other, _BindParamClause) and
>> other.type.__class__ == self.type.__class__ and self.value ==
>> other.value
>> +        return isinstance(other, _BindParamClause) and \
>> +            len(set(other.type.__class__.__mro__).intersection(
>> +                self.type.__class__.__mro__
>> +            )) > 3 \
>> +            and self.value == other.value
>>
>>      def __getstate__(self):
>>          """execute a deferred value for serialization purposes."""
>>
>>
>> if that works let's make a trac ticket to add tests for this.
>>
>>
>>
>>
>>
>
>
> --
> David Gardner
> Pipeline Tools Programmer
> Jim Henson Creature Shop
> [email protected]
>
>
>
> >
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to