[sqlalchemy] Re: r3507 breaks here
On Sep 25, 2007, at 12:15 PM, [EMAIL PROTECTED] wrote: anyway, all 10328 (joined) cases pass, have a nice day. svilen ive changed my approach on this one to what i should have done in the 1st place. try out 3518. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: r3507 breaks here
On Wednesday 26 September 2007 20:09:10 Michael Bayer wrote: On Sep 25, 2007, at 12:15 PM, [EMAIL PROTECTED] wrote: anyway, all 10328 (joined) cases pass, have a nice day. svilen ive changed my approach on this one to what i should have done in the 1st place. try out 3518. ok too now, with no special naming. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: r3507 breaks here
On Sep 25, 2007, at 1:18 AM, [EMAIL PROTECTED] wrote: On Monday 24 September 2007 22:31:35 Michael Bayer wrote: On Sep 24, 2007, at 12:13 PM, [EMAIL PROTECTED] wrote: it something to do with that expects thing... just do a x = str(b) before session.clear(), breaks it all. OK...that was just a *great* way to spend all day tracking that one down. its fixed in 3515. I didn't bother to see why it doesn't exist in 0.3, but its confusing that it doesn't, since the basic mechanics of this one are present there as well, there must be some subtlety which conceals it. I hope you can find more insanely obscure bugs like this for me tomorrow ! now that u mentioned it... r3515 introduces something: File /home/az/src/dbcook/sqlalchemy/orm/query.py, line 619, in __iter__ return self._execute_and_instances(statement) File /home/az/src/dbcook/sqlalchemy/orm/query.py, line 624, in _execute_and_instances return iter(self.instances(result)) File /home/az/src/dbcook/sqlalchemy/orm/query.py, line 680, in instances self.select_mapper._instance(context, row, result) File /home/az/src/dbcook/sqlalchemy/orm/mapper.py, line 1360, in _instance discriminator = row[self.polymorphic_on] File /home/az/src/dbcook/sqlalchemy/engine/base.py, line 1590, in __getitem__ return self.__parent._get_col(self.__row, key) File /home/az/src/dbcook/sqlalchemy/engine/base.py, line 1394, in _get_col rec = self._key_cache[key] File /home/az/src/dbcook/sqlalchemy/util.py, line 72, in __missing__ self[key] = val = self.creator(key) File /home/az/src/dbcook/sqlalchemy/engine/base.py, line 1304, in lookup_key raise exceptions.NoSuchColumnError(Could not locate column in row for column '%s' % (str(key))) NoSuchColumnError: Could not locate column in row for column 'pu_a.atype' ? failed A.query_SUB_instances: Could not locate column in row for column 'pu_a.atype' pu_a is polymorphic union, and fails only if from_statement() is involved. yeah thats exactly the bug that was fixed. an Alias object now indicates to the ResultProxy to only match Column objects based on the exact labeled name of that column (which is normally tablename_columnname). maybe you can adjust your polymorphic_union and/or from_statement() to better match up. Theres possibly a way to make this work both ways (i.e. by only having eagerload aliases actually use this new flag, other kinds of aliases act the old way) but I want to see if you can work around it first. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: r3507 breaks here
ive grepped all the code and cannot find a create_row_processor method that is returning a 2-tuple (which is what it used to be); theyre all returning 3-tuples..and of course all those methods have test coverage too. have you tried deleting all the .pyc files to ensure all python modules have recompiled ? On Sep 24, 2007, at 1:39 AM, [EMAIL PROTECTED] wrote: hi. r3506 is still ok, while r3507 gives this: result: [] expected: [35] SAMPLE: 2006-09-11 00:00:00 2006-09-12 00:00:00 2006-09-14 00:00:00 [35] 'trans exact, valids between _2' FROM test_range TimedRangeTestCase -- Traceback (most recent call last): ... File test_timed_dbcook.py, line 142, in _get_range_val q = me.val.get_obj_history_in_range( me.val.OBJ_ID, timeFrom, timeTo).all() File /home/az/src/hor-trunk/sqlalchemy/orm/query.py, line 571, in all return list(self) File /home/az/src/hor-trunk/sqlalchemy/orm/query.py, line 619, in __iter__ return self._execute_and_instances(statement) File /home/az/src/hor-trunk/sqlalchemy/orm/query.py, line 624, in _execute_and_instances return iter(self.instances(result)) File /home/az/src/hor-trunk/sqlalchemy/orm/query.py, line 680, in instances self.select_mapper._instance(context, row, result) File /home/az/src/dbcook/sqlalchemy/orm/mapper.py, line 1436, in _instance self.populate_instance(context, instance, row, **flags) File /home/az/src/dbcook/sqlalchemy/orm/mapper.py, line 1496, in populate_instance (newpop, existingpop, post_proc) = prop.create_row_processor(selectcontext, self, row) ValueError: need more than 2 values to unpack the result query is somewhat awwful, but it works before that: -- TEST trans exact, valids between _2* SA: INFO SELECT PolymBase.disabled AS PolymBase_disabled, PolymBase.val AS PolymBase_val, PolymBase.time_valid AS PolymBase_time_valid, PolymBase.time_trans AS PolymBase_time_trans, PolymBase.obj_id AS PolymBase_obj_id, PolymBase.atype AS PolymBase_atype, PolymBase.db_id AS PolymBase_db_id, PolymLeaf.db_id AS PolymLeaf_db_id FROM ( SELECT max(PolymBase.db_id) AS db_id, PolymBase.time_trans AS time_trans, PolymBase.time_valid AS time_valid FROM PolymBase JOIN ( SELECT max(PolymBase.time_trans) AS time_trans, PolymBase.time_valid AS time_valid FROM PolymBase WHERE PolymBase.time_trans = ? AND PolymBase.time_valid = ? AND PolymBase.time_valid = ? AND PolymBase.obj_id = ? AND PolymBase.atype = ? GROUP BY PolymBase.time_valid ) AS t1 ON PolymBase.time_valid = t1.time_valid AND PolymBase.time_trans = t1.time_trans WHERE PolymBase.obj_id = ? AND PolymBase.atype = ? GROUP BY PolymBase.time_valid, PolymBase.time_trans ) AS timedr, PolymBase JOIN PolymLeaf ON PolymLeaf.db_id = PolymBase.db_id WHERE PolymBase.db_id = timedr.db_id AND NOT PolymBase.disabled ORDER BY PolymBase.time_valid * SA: INFO [11, 12, 14, 1, 'PolymLeaf', 1, 'PolymLeaf'] any idea? i mau try prepare some stripped testcase but it'll take time... if u wanna try, svn co then run make in https://dbcook.svn.sourceforge.net/svnroot/dbcook/trunk/dbcook/misc/ timed2/test/ or do PYTHONPATH=..:../../../..:../../..:$(PYTHONPATH) python test_timed_dbcook.py svil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: r3507 breaks here
somethings weird. if i take out your expects/me.query stuff (which remains impossible to read), and do this : session.clear() for o in session.query(A): print str(o) I get this: C( db_id=1 linkA=None linkC=B( id=notset name=ben ) dataC=mc name=cc ) A( db_id=2 linkA=B( id=notset name=ben ) name=anna ) B( db_id=3 linkB=C( id=notset name=cc ) linkA=None name=ben dataB=gun ) which is correct. im trying all sorts of things and I cant get the linkB=B condition the test case claims. but this expects string: dict( klas= A, table= table_A, oid= a.db_id, exp_single= str(a), exp_multi = [ str(a), str(b), str(c) ]), returns the wrong result. what am i doing wrong ? On Sep 24, 2007, at 10:53 AM, [EMAIL PROTECTED] wrote: scratch that, i found one, try r3512. this one is ok now. Another one. - the A-B-C all-cases works 100% on 0.3.xx but some cases fail on 0.4.anything. Attached is one ~random case of about 168 similar ones - t1.py. ciao sa_gentestbase.py t1.py --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: r3507 breaks here
it something to do with that expects thing... just do a x = str(b) before session.clear(), breaks it all. On Monday 24 September 2007 18:57:36 Michael Bayer wrote: somethings weird. if i take out your expects/me.query stuff (which remains impossible to read), and do this : session.clear() for o in session.query(A): print str(o) I get this: C( db_id=1 linkA=None linkC=B( id=notset name=ben ) dataC=mc name=cc ) A( db_id=2 linkA=B( id=notset name=ben ) name=anna ) B( db_id=3 linkB=C( id=notset name=cc ) linkA=None name=ben dataB=gun ) which is correct. im trying all sorts of things and I cant get the linkB=B condition the test case claims. but this expects string: dict( klas= A, table= table_A, oid= a.db_id, exp_single= str(a), exp_multi = [ str(a), str(b), str(c) ]), returns the wrong result. what am i doing wrong ? On Sep 24, 2007, at 10:53 AM, [EMAIL PROTECTED] wrote: scratch that, i found one, try r3512. this one is ok now. Another one. - the A-B-C all-cases works 100% on 0.3.xx but some cases fail on 0.4.anything. Attached is one ~random case of about 168 similar ones - t1.py. ciao sa_gentestbase.py t1.py --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: r3507 breaks here
On Sep 24, 2007, at 12:13 PM, [EMAIL PROTECTED] wrote: it something to do with that expects thing... just do a x = str(b) before session.clear(), breaks it all. OK...that was just a *great* way to spend all day tracking that one down. its fixed in 3515. I didn't bother to see why it doesn't exist in 0.3, but its confusing that it doesn't, since the basic mechanics of this one are present there as well, there must be some subtlety which conceals it. I hope you can find more insanely obscure bugs like this for me tomorrow ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: r3507 breaks here
On Monday 24 September 2007 22:31:35 Michael Bayer wrote: On Sep 24, 2007, at 12:13 PM, [EMAIL PROTECTED] wrote: it something to do with that expects thing... just do a x = str(b) before session.clear(), breaks it all. OK...that was just a *great* way to spend all day tracking that one down. its fixed in 3515. I didn't bother to see why it doesn't exist in 0.3, but its confusing that it doesn't, since the basic mechanics of this one are present there as well, there must be some subtlety which conceals it. I hope you can find more insanely obscure bugs like this for me tomorrow ! at your service, sir |-: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: r3507 breaks here
On Monday 24 September 2007 22:31:35 Michael Bayer wrote: On Sep 24, 2007, at 12:13 PM, [EMAIL PROTECTED] wrote: it something to do with that expects thing... just do a x = str(b) before session.clear(), breaks it all. OK...that was just a *great* way to spend all day tracking that one down. its fixed in 3515. I didn't bother to see why it doesn't exist in 0.3, but its confusing that it doesn't, since the basic mechanics of this one are present there as well, there must be some subtlety which conceals it. I hope you can find more insanely obscure bugs like this for me tomorrow ! now that u mentioned it... r3515 introduces something: File /home/az/src/dbcook/sqlalchemy/orm/query.py, line 619, in __iter__ return self._execute_and_instances(statement) File /home/az/src/dbcook/sqlalchemy/orm/query.py, line 624, in _execute_and_instances return iter(self.instances(result)) File /home/az/src/dbcook/sqlalchemy/orm/query.py, line 680, in instances self.select_mapper._instance(context, row, result) File /home/az/src/dbcook/sqlalchemy/orm/mapper.py, line 1360, in _instance discriminator = row[self.polymorphic_on] File /home/az/src/dbcook/sqlalchemy/engine/base.py, line 1590, in __getitem__ return self.__parent._get_col(self.__row, key) File /home/az/src/dbcook/sqlalchemy/engine/base.py, line 1394, in _get_col rec = self._key_cache[key] File /home/az/src/dbcook/sqlalchemy/util.py, line 72, in __missing__ self[key] = val = self.creator(key) File /home/az/src/dbcook/sqlalchemy/engine/base.py, line 1304, in lookup_key raise exceptions.NoSuchColumnError(Could not locate column in row for column '%s' % (str(key))) NoSuchColumnError: Could not locate column in row for column 'pu_a.atype' ? failed A.query_SUB_instances: Could not locate column in row for column 'pu_a.atype' pu_a is polymorphic union, and fails only if from_statement() is involved. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~--~~~~--~~--~--~--- _t3515.py Description: application/python sa_gentestbase.py Description: application/python