Hello. I have returned to investigate the issue. Are you still interested?
On Fri, Jul 31, 2009 at 01:10:34PM -0400, Stef Telford wrote:
> Okay.. so.. assuming I can get a writeLock again after del'ing it..
> we should be good there. If you can let me know exactly -what- in the
> sqlmeta blows up, that may also help matters. The connection surely
> explodes (And rightly so I think).
The problem with sqlmeta is that it's a class generated on the fly. It
doesn't even have a module - and pickle protocol prefers stable classes,
with proper modules and names.
But I think it's easy to deal with it anyway. We don't need to pickle
sqlmeta *class* - the class is in the corresponding SQLObject class. We
probably even don't need to pickle sqlmeta instance - we can just recreate
it on unpickling 'cause its only instance data is a reference to SQLObject
instance and we know the instance - at the time of unpickling it's 'self'
so we can reconstruct a sqlmeta instance using the known class and known
instance data. Just for the (rare) case a user would have put some data
into the instance I can save sqlmeta.__dict__ and restore it on unpickling.
I am going to add the corresponding __getstate__ and __setstate__ to
SQLObject and test them a bit.
Oleg.
--
Oleg Broytman http://phd.pp.ru/ [email protected]
Programmers don't die, they just GOSUB without RETURN.
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss