[sqlalchemy] Re: SA 0.3.4 released

2007-01-24 Thread JP


 I cant keep up with all thats going on at this point, and the trunk
 was just burstingso I need to get out what we have thus far and
 see how far it flies.

Not very far around here, I'm afraid. Just updated and ran my test
suite (which passes with 0.3.3) and I'm getting batches of errors like:

  File (redacted), line 162, in test_offer_interfaces
offer_resp.options.append(offer_opt)
  File
/home/jhp/work/sqlalchemy_0_3_4/lib/sqlalchemy/orm/attributes.py,
line 418, in append
self._data_appender(item)
  File
/home/jhp/work/sqlalchemy_0_3_4/lib/sqlalchemy/orm/attributes.py,
line 390, in __getattr__
return getattr(self.data, attr)
  File /home/jhp/work/sqlalchemy_0_3_4/lib/sqlalchemy/orm/query.py,
line 301, in __getattr__
raise AttributeError(key)
AttributeError: _data_appender

The relation is a normal one-many, set up using assign_mapper on the
many side:

assign_mapper(CTX, OfferOption, offer_option, properties={
'offer': relation(OfferResponse, backref='options')
})

I've also seen errors with inherited mappers seeming to no longer
populate foreign keys properly on flush, but those are a little harder
to boil down to a simple, non-NDS-violating example.

Should I file a ticket for the _data_appender error? What else can I do
to help track it down?

JP


--~--~-~--~~~---~--~~
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: SA 0.3.4 released

2007-01-24 Thread Michael Bayer


see, i wish folks would use the trunk more.  yeah, file tickets, and  
every bug fixed becomes a unit test.  this one seems like something  
trivial.  the inheritance thing, try to track that down...we have *so  
many* inheritance tests at this point i cant believe theres still  
basic issues coming up.


On Jan 24, 2007, at 11:26 AM, JP wrote:



 I cant keep up with all thats going on at this point, and the trunk
 was just burstingso I need to get out what we have thus far and
 see how far it flies.

 Not very far around here, I'm afraid. Just updated and ran my test
 suite (which passes with 0.3.3) and I'm getting batches of errors  
 like:

   File (redacted), line 162, in test_offer_interfaces
 offer_resp.options.append(offer_opt)
   File
 /home/jhp/work/sqlalchemy_0_3_4/lib/sqlalchemy/orm/attributes.py,
 line 418, in append
 self._data_appender(item)
   File
 /home/jhp/work/sqlalchemy_0_3_4/lib/sqlalchemy/orm/attributes.py,
 line 390, in __getattr__
 return getattr(self.data, attr)
   File /home/jhp/work/sqlalchemy_0_3_4/lib/sqlalchemy/orm/query.py,
 line 301, in __getattr__
 raise AttributeError(key)
 AttributeError: _data_appender

 The relation is a normal one-many, set up using assign_mapper on the
 many side:

 assign_mapper(CTX, OfferOption, offer_option, properties={
 'offer': relation(OfferResponse, backref='options')
 })

 I've also seen errors with inherited mappers seeming to no longer
 populate foreign keys properly on flush, but those are a little harder
 to boil down to a simple, non-NDS-violating example.

 Should I file a ticket for the _data_appender error? What else can  
 I do
 to help track it down?

 JP


 


--~--~-~--~~~---~--~~
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: SA 0.3.4 released

2007-01-24 Thread JP

I filed #438 for the _data_appender thing:
http://www.sqlalchemy.org/trac/ticket/438.

For the other one, I'll try to put together a simple test case outside
of the code that belongs to my employer. I'll also see what I can do
about setting up a buildbot in our system to test our stuff against SA
trunk. Both of those are likely to take a few days, time is a bit tight
this week.

JP

On Jan 24, 11:41 am, Michael Bayer [EMAIL PROTECTED] wrote:
 see, i wish folks would use the trunk more.  yeah, file tickets, and
 every bug fixed becomes a unit test.  this one seems like something
 trivial.  the inheritance thing, try to track that down...we have *so
 many* inheritance tests at this point i cant believe theres still
 basic issues coming up.

 On Jan 24, 2007, at 11:26 AM, JP wrote:



  I cant keep up with all thats going on at this point, and the trunk
  was just burstingso I need to get out what we have thus far and
  see how far it flies.

  Not very far around here, I'm afraid. Just updated and ran my test
  suite (which passes with 0.3.3) and I'm getting batches of errors
  like:

File (redacted), line 162, in test_offer_interfaces
  offer_resp.options.append(offer_opt)
File
  /home/jhp/work/sqlalchemy_0_3_4/lib/sqlalchemy/orm/attributes.py,
  line 418, in append
  self._data_appender(item)
File
  /home/jhp/work/sqlalchemy_0_3_4/lib/sqlalchemy/orm/attributes.py,
  line 390, in __getattr__
  return getattr(self.data, attr)
File /home/jhp/work/sqlalchemy_0_3_4/lib/sqlalchemy/orm/query.py,
  line 301, in __getattr__
  raise AttributeError(key)
  AttributeError: _data_appender

  The relation is a normal one-many, set up using assign_mapper on the
  many side:

  assign_mapper(CTX, OfferOption, offer_option, properties={
  'offer': relation(OfferResponse, backref='options')
  })

  I've also seen errors with inherited mappers seeming to no longer
  populate foreign keys properly on flush, but those are a little harder
  to boil down to a simple, non-NDS-violating example.

  Should I file a ticket for the _data_appender error? What else can
  I do
  to help track it down?
 
  JP


--~--~-~--~~~---~--~~
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: SA 0.3.4 released

2007-01-24 Thread JP

I added some info from pdb and from the patch you attached to the
ticket. Both agree that for some reason, the attribute is a Query
instance instead of an InstrumentedList instance, which is more than a
little confusing. I'm trying to come up with a simplified test case,
but so far I haven't been able to reproduce the error outside of the
full context.

JP

On Jan 24, 12:44 pm, Michael Bayer [EMAIL PROTECTED] wrote:
 OK we have a lot of tests that pass with assign_mapper...can you give
 me a little more of a test case for 438 ?  its a weird error since
 not much has changed with attributes...

 On Jan 24, 2007, at 12:12 PM, JP wrote:



  I filed #438 for the _data_appender thing:
 http://www.sqlalchemy.org/trac/ticket/438.

  For the other one, I'll try to put together a simple test case outside
  of the code that belongs to my employer. I'll also see what I can do
  about setting up a buildbot in our system to test our stuff against SA
  trunk. Both of those are likely to take a few days, time is a bit
  tight
  this week.

  JP

  On Jan 24, 11:41 am, Michael Bayer [EMAIL PROTECTED] wrote:
  see, i wish folks would use the trunk more.  yeah, file tickets, and
  every bug fixed becomes a unit test.  this one seems like something
  trivial.  the inheritance thing, try to track that down...we have *so
  many* inheritance tests at this point i cant believe theres still
  basic issues coming up.

  On Jan 24, 2007, at 11:26 AM, JP wrote:

  I cant keep up with all thats going on at this point, and the trunk
  was just burstingso I need to get out what we have thus far and
  see how far it flies.

  Not very far around here, I'm afraid. Just updated and ran my test
  suite (which passes with 0.3.3) and I'm getting batches of errors
  like:

File (redacted), line 162, in test_offer_interfaces
  offer_resp.options.append(offer_opt)
File
  /home/jhp/work/sqlalchemy_0_3_4/lib/sqlalchemy/orm/attributes.py,
  line 418, in append
  self._data_appender(item)
File
  /home/jhp/work/sqlalchemy_0_3_4/lib/sqlalchemy/orm/attributes.py,
  line 390, in __getattr__
  return getattr(self.data, attr)
File /home/jhp/work/sqlalchemy_0_3_4/lib/sqlalchemy/orm/
  query.py,
  line 301, in __getattr__
  raise AttributeError(key)
  AttributeError: _data_appender

  The relation is a normal one-many, set up using assign_mapper on the
  many side:

  assign_mapper(CTX, OfferOption, offer_option, properties={
  'offer': relation(OfferResponse, backref='options')
  })

  I've also seen errors with inherited mappers seeming to no longer
  populate foreign keys properly on flush, but those are a little
  harder
  to boil down to a simple, non-NDS-violating example.

  Should I file a ticket for the _data_appender error? What else can
  I do
  to help track it down?
 
  JP


--~--~-~--~~~---~--~~
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: SA 0.3.4 released

2007-01-24 Thread JP

(repeating my last ticket comment)

Ok, I think I've tracked this down. The error is occurring because the
name of the backref is 'options', which as of r2205 is being
overwritten by assign_mapper.

I'm not sure what's the right thing to do here. I don't think
assign_mapper can avoid stepping on backrefs like this one, since (I
think) the backref doesn't exist when assign_mapper is monkeypatching
the domain model class.

JP


--~--~-~--~~~---~--~~
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: SA 0.3.4 released

2007-01-24 Thread Michael Bayer

hey jason -

someone reported an error regarding many-to-one relationships to  
certain polymorphic joins, which was definitely introduced in 0.3.4.   
ive fixed that issue in rev 2250.  if your inheritance conditions use  
polymorphic unions, you might want to try it out and see if it  
resolves your other problem.

- mike


On Jan 24, 2007, at 2:19 PM, JP wrote:


 (repeating my last ticket comment)

 Ok, I think I've tracked this down. The error is occurring because the
 name of the backref is 'options', which as of r2205 is being
 overwritten by assign_mapper.

 I'm not sure what's the right thing to do here. I don't think
 assign_mapper can avoid stepping on backrefs like this one, since (I
 think) the backref doesn't exist when assign_mapper is monkeypatching
 the domain model class.

 JP


 


--~--~-~--~~~---~--~~
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: SA 0.3.4 released

2007-01-24 Thread Michael Bayer

ahha !

every time i let the little inoccuous ones go through this is what we  
get.

this is actually somewhat of a legacy behavior, as the idea of saying  
class Foo(object):someattribute=list  was the old way to specify the  
collection_class setting, and thats whats happening here; attribute  
instrumentation is mistaking the query options() method for a  
collection class.

so, i want to take that old way out although im not sure if i should  
do that before a major version release.  so heres the workaround:

assign_mapper(CTX, OfferOption, offer_option, properties={
 'offer': relation(OfferResponse, backref=backref('options',  
collection_class=list))
 })


On Jan 24, 2007, at 2:19 PM, JP wrote:


 (repeating my last ticket comment)

 Ok, I think I've tracked this down. The error is occurring because the
 name of the backref is 'options', which as of r2205 is being
 overwritten by assign_mapper.

 I'm not sure what's the right thing to do here. I don't think
 assign_mapper can avoid stepping on backrefs like this one, since (I
 think) the backref doesn't exist when assign_mapper is monkeypatching
 the domain model class.

 JP


 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---