Argh, whitespace problems in mail editor. I'll try again
def myClassFactory(connection, modulename, globalname):
# simplified, without error checking
theGlobal = find_global(modulename, globalname)
if issubclass(theGlobal, Broken):
newModulename, newGlobalname =
Dieter Maurer skrev:
Chris S wrote at 2006-9-3 15:40 -0400:
Is there a standard procedure for dealing with fundamental changes to
classes? For instance, how do you make a ZODB cope with a class being
renamed, or being placed in a different location? How will it know
that oldmod.myclass ==
Tim Peters wrote:
[Syver Enstad]
I have recently upgraded from ZODB 3.2 to 3.5.1. After doing this I
notice that ZEO throws exceptions on commiting a transaction for certain
types of Persistent classes.
...
I was able to create a small self-contained test case from this description
-08-25.log.html
[Stephan Richter]
The resulting code from the discussion is publically available in the
SchoolTool source:
http://source.schooltool.org/viewcvs/trunk/schooltool/src/schooltool/genera
tions/evolve5.py?rev=4984view=auto
[Syver Enstad]
Thank you Stefan. I am
development use an internal 3.6.0b3 release (i.e., it's
solid enough, but I haven't had time to make/test/publish
tarballs/installers/news/etc).
[Syver Enstad]
...
What I don't like is that this will break for the following case as far
as I see.
firstModule.First renamed - secondModule.Second
Stephan Richter wrote:
On Wednesday 09 November 2005 11:00, Tim Peters wrote:
Stephan Richter was wrestling with a migration script a couple months ago.
I don't know whether he packaged the code he ended up with for reuse.
Here's a record of the IRC chat in which details got worked out:
Lennart Regebro wrote:
This may not help, but anyway. :)
In Zope, I did this: I moved the class to the module I wanted it. I
also kept a dummy class in the old place like so:
from newplace import class
so that the old objects worked. Then I wrote a script to go through
the ZODB and recreate
Stephan Richter wrote:
On Wednesday 09 November 2005 11:00, Tim Peters wrote:
Stephan Richter was wrestling with a migration script a couple months ago.
I don't know whether he packaged the code he ended up with for reuse.
Here's a record of the IRC chat in which details got worked out:
Dieter Maurer wrote:
Syver Enstad wrote at 2005-11-7 11:51 +0100:
In ZODB 3.2 I can replace the _classFactory method on DB and locate the
renamed/moved class by other means (a lookup table that maps old module
classname pairs to another class in another module). If I change
attributes