Re: [sqlalchemy] Pickle/beaker error with InstrumentedList

2011-12-30 Thread Arturo Sevilla
On Tuesday, December 27, 2011 7:22:03 AM UTC-8, Michael Bayer wrote: On Dec 27, 2011, at 4:54 AM, Arturo Sevilla wrote: Thanks for the code, your example runs without a problem. I've managed to locate the error. In reality it doesn't have to do with InstrumentedList. The problem

Re: [sqlalchemy] migration to trac 0.12

2011-12-30 Thread Wichert Akkerman
On 12/30/2011 02:36 AM, Michael Bayer wrote: Hi all - Just in the interests of keeping fresh, I've upgraded Trac from 0.11 to 0.12, as part of a migration of all of sqlalchemy.org to a new host. Assuming your dns has switched, you'll be browsing around the updated interface which has some

Re: [sqlalchemy] Pickle/beaker error with InstrumentedList

2011-12-30 Thread Michael Bayer
On Dec 30, 2011, at 6:34 AM, Arturo Sevilla wrote: import cPickle dumped = cPickle.dumps(user) assert cPickle.loads(dumped).id == 1 # ERROR I get sqlalchemy.orm.exc.DetachedInstanceError: Instance User at 0x1405dd0 is not bound to a Session; attribute refresh operation cannot proceed

Re: [sqlalchemy] migration to trac 0.12

2011-12-30 Thread Michael Bayer
On Dec 30, 2011, at 7:14 AM, Wichert Akkerman wrote: On 12/30/2011 02:36 AM, Michael Bayer wrote: Hi all - Just in the interests of keeping fresh, I've upgraded Trac from 0.11 to 0.12, as part of a migration of all of sqlalchemy.org to a new host. Assuming your dns has switched, you'll

Re: [sqlalchemy] Pickle/beaker error with InstrumentedList

2011-12-30 Thread Arturo Sevilla
Ah, OK so what's happening is that _sa_instance_state hasn't yet been assigned to the User object during the unpickle process, then your __eq__() is trying to get at self.id which triggers the attribute system and requires a fully composed User object. Here you'd need to either have a

Re: [sqlalchemy] Pickle/beaker error with InstrumentedList

2011-12-30 Thread Arturo Sevilla
Nope, the problem persists, but not with the unpickle process but after it with composite attributes. For example, I have the first_name attribute on User, but also contact which is a MutableComposite. If I do the following (after the unpickle process): assert user.first_name = 'name' I don't

Re: [sqlalchemy] Pickle/beaker error with InstrumentedList

2011-12-30 Thread Michael Bayer
On Dec 30, 2011, at 7:46 PM, Arturo Sevilla wrote: Nope, the problem persists, but not with the unpickle process but after it with composite attributes. For example, I have the first_name attribute on User, but also contact which is a MutableComposite. If I do the following (after the

Re: [sqlalchemy] Pickle/beaker error with InstrumentedList

2011-12-30 Thread Arturo Sevilla
On Friday, December 30, 2011 8:26:45 PM UTC-8, Michael Bayer wrote: On Dec 30, 2011, at 7:46 PM, Arturo Sevilla wrote: Nope, the problem persists, but not with the unpickle process but after it with composite attributes. For example, I have the first_name attribute on User, but also

Re: [sqlalchemy] Pickle/beaker error with InstrumentedList

2011-12-30 Thread Michael Bayer
On Dec 30, 2011, at 11:35 PM, Arturo Sevilla wrote: On Friday, December 30, 2011 8:26:45 PM UTC-8, Michael Bayer wrote: On Dec 30, 2011, at 7:46 PM, Arturo Sevilla wrote: Nope, the problem persists, but not with the unpickle process but after it with composite attributes. For

Re: [sqlalchemy] Pickle/beaker error with InstrumentedList

2011-12-30 Thread Michael Bayer
On Dec 30, 2011, at 11:47 PM, Michael Bayer wrote: OK so we're down to that same thing, will still see if something can be done. a test case plus a simple patch resolving is at http://www.sqlalchemy.org/trac/ticket/2362 . -- You received this message because you are subscribed to the