[ZODB-Dev] Using zodbex' change modules functionality

Chris McDonough chrism@zope.com
Tue, 23 Oct 2001 11:08:48 -0400


It's not (yet) documented in the Developer's Guide, but here's the
body of the message.  I'm off to add a comment to the developer's
guide with this in it.

"""
It works by putting a tuple of tuples in your Product's __init__.py
module
in a __module_aliases__ attribute at module scope.  For example,
PythonScripts have the following __module_aliases__ attribute.

  from Shared.DC import Scripts
  __module_aliases__ = (
      ('Products.PythonScripts.Script', Scripts.Script),
      ('Products.PythonScripts.Bindings', Scripts.Bindings),
      ('Products.PythonScripts.BindingsUI', Scripts.BindingsUI),)

.. this maps the module that *used* to be at
Products.PythonScripts.Script
to the module that is *now* at Scripts.Script, etc.  This only works
with
modules and not with classes or other types.
"""

----- Original Message -----
From: "Shane Hathaway" <shane@zope.com>
To: "Morten W. Petersen" <morten@thingamy.net>
Cc: <zodb-dev@zope.org>
Sent: Tuesday, October 23, 2001 10:52 AM
Subject: Re: [ZODB-Dev] Using zodbex' change modules functionality


> Morten W. Petersen wrote:
>
> > I'm changing the name of a product, and when doing this, other
products
> > that rely on this product don't work anymore.
> >
> > Will the zodbex change modules module be able to help me fix
> > this?
>
>
> Ack, don't use the change modules script yet!  I haven't even
finished
> or tested it.  (Unless you really know ZODB innards and would be
willing
> to truncate your data.fs if necessary ;-) )
>
> For now you can use module aliases.  ChrisM recently posted a
message on
> one of the Zope lists about it and there might be a howto somewhere.
> Actually, maybe it's even documented in the developer's guide (where
it
> should be.)
>
> Shane
>
>
> _______________________________________________
> For more information about ZODB, see the ZODB Wiki:
> http://www.zope.org/Wikis/ZODB/
>
> ZODB-Dev mailing list  -  ZODB-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zodb-dev
>