[Product-Developers] Renaming packages
Derek Richardson
derek.richardson at gatech.edu
Sat Apr 19 14:50:31 UTC 2008
I have decided to change package names: plone.syndication.outbound to
vice.outbound and plone.app.syndication.outbound to vice.plone.outbound. I have
already done the global renames and gotten tests working again.
The problem is that there are a handful of people using vice in production
already. I need to provide a migration so that old sites don't break.
The only substantial differences between the old and new versions are the
package renames. I thus tried this trick:
import sys
import vice.outbound
import vice.plone.outbound
sys.modules['plone.syndication.outbound'] = vice.outbound
sys.modules['plone.app.syndication.outbound'] = vice.plone.outbound
As far as I can tell, this doesn't work. I don't know if it because it
*shouldn't* work or just because I haven't wired it into my buildout correctly
so that the aliases are created at the proper time.
All packages before the terminal package are namespace packages.
Please let me know if you have an opinion as to whether this code should or
shouldn't work. That will let me know whether to continue on this path, assuming
I just have to get my buildout configured correctly, or whether I need to try
something completely different. Also, if you have an idea about how to
accomplish my goal (migrating packages) better, I'd love to hear it!
Thanks,
Derek
More information about the Product-Developers
mailing list