Re: [ZODB-Dev] Broken instances after refactoring in ZODB

2008-10-06 Thread Dieter Maurer
Leonardo Santagada wrote at 2008-10-4 16:42 -0300: > ... >Why doesn't zodb has a table of some form for this info? You can implement one -- if you think this is worth the effort. The ZODB has a hook "classFactory(connection modulename, globalname)" on the "DB" class. It is responsible for mapping

Re: [ZODB-Dev] Broken instances after refactoring in ZODB

2008-10-06 Thread Shane Hathaway
Leonardo Santagada wrote: > Why doesn't zodb has a table of some form for this info? I heard that > sometimes for very small objects the string containing this > information can use up to 30% of the whole space of the file (using > FileStorage). How does RelStorage store this? RelStorage doe

Re: [ZODB-Dev] Broken instances after refactoring in ZODB

2008-10-04 Thread Hanno Schlichting
Leonardo Santagada wrote: > On Oct 4, 2008, at 7:35 PM, Hanno Schlichting wrote: >> >> You can have a look at http://www.python.org/dev/peps/pep-0307. >> >> I'd suggest you try this out on some small typical data set and just >> look at the generated pickles. > > In zope catalogs the objects are a

Re: [ZODB-Dev] Broken instances after refactoring in ZODB

2008-10-04 Thread Leonardo Santagada
On Oct 4, 2008, at 7:35 PM, Hanno Schlichting wrote: > Laurence Rowe wrote: >> Leonardo Santagada wrote: >> >>> Why doesn't zodb has a table of some form for this info? I heard >>> that >>> sometimes for very small objects the string containing this >>> information can use up to 30% of the whol

Re: [ZODB-Dev] Broken instances after refactoring in ZODB

2008-10-04 Thread Hanno Schlichting
Laurence Rowe wrote: > Leonardo Santagada wrote: > >> Why doesn't zodb has a table of some form for this info? I heard that >> sometimes for very small objects the string containing this >> information can use up to 30% of the whole space of the file (using >> FileStorage). How does RelStora

Re: [ZODB-Dev] Broken instances after refactoring in ZODB

2008-10-04 Thread Laurence Rowe
Leonardo Santagada wrote: > On Oct 4, 2008, at 12:36 PM, Wichert Akkerman wrote: > >> Adam wrote: >>> >>> Thanks for that, guys, I've not used a mailing list like this >>> before so >>> unsure how to respond. >>> >>> If ZODB stores the Package.Module.Class name in the pickle would it >>> be >>

Re: [ZODB-Dev] Broken instances after refactoring in ZODB

2008-10-04 Thread Leonardo Santagada
On Oct 4, 2008, at 12:36 PM, Wichert Akkerman wrote: > Adam wrote: >> >> >> Thanks for that, guys, I've not used a mailing list like this >> before so >> unsure how to respond. >> >> If ZODB stores the Package.Module.Class name in the pickle would it >> be >> possible for me to simply rename

Re: [ZODB-Dev] Broken instances after refactoring in ZODB

2008-10-04 Thread Wichert Akkerman
Adam wrote: On Fri, 2008-10-03 at 14:24 -0600, Shane Hathaway wrote: Marius Gedminas wrote: 1. create modules in their old locations that import all the classes from the new locations (and do nothing else). 2. write a script that opens the DB, iterates over all persistent

Re: [ZODB-Dev] Broken instances after refactoring in ZODB

2008-10-04 Thread Adam
On Fri, 2008-10-03 at 14:24 -0600, Shane Hathaway wrote: > Marius Gedminas wrote: > > 1. create modules in their old locations that import all the classes > > from the new locations (and do nothing else). > > 2. write a script that opens the DB, iterates over all persistent > > object

Re: [ZODB-Dev] Broken instances after refactoring in ZODB

2008-10-03 Thread Shane Hathaway
Marius Gedminas wrote: > 1. create modules in their old locations that import all the classes > from the new locations (and do nothing else). > 2. write a script that opens the DB, iterates over all persistent > objects in it, touches every single one of them (obj._p_activate() >

Re: [ZODB-Dev] Broken instances after refactoring in ZODB

2008-10-03 Thread Marius Gedminas
On Fri, Oct 03, 2008 at 11:37:35AM +0100, Adam wrote: > Hi, I wonder if anyone can help me. > > I've got a custom Python cgi which runs in one directory using ZODB for > the database. It runs in a directory off the site root ie. /System > > It's got a bit unwieldy in there so I wanted to separate

[ZODB-Dev] Broken instances after refactoring in ZODB

2008-10-03 Thread Adam
Hi, I wonder if anyone can help me. I've got a custom Python cgi which runs in one directory using ZODB for the database. It runs in a directory off the site root ie. /System It's got a bit unwieldy in there so I wanted to separate the core modules out as I don't really touch them any more, so ad