[Zope-dev] dropping Python 2.4 support in the Zope Toolkit?
Martijn Faassen
faassen at startifact.com
Tue May 5 10:40:25 EDT 2009
Martin Aspeli wrote:
> Martijn Faassen wrote:
>
>> As I pointed out, it is effectively inaccessible for Plone users anyway,
>> as Zope 3 is already installed. You *cannot* mix Zope Toolkit and Zope 3
>> libraries just like that and expect anything to work.
>
> Why not? We upgrade Zope 3.3 packages to 3.4+ all the time to access bug
> fixes or new features. It's rarely completely painful, but once you've
> got an understanding of what versions work and don't work together, you
> do have the option of selectively upgrading parts of the zope.* namespace.
The reason why it is a lot more subtle after Zope 3.4 is because we've
moved stuff around between packages a lot. Things might, of course, work
but I'd certainly not feel very safe doing this.
z3c.form relies on zope.site
If you install z3c.form, you'll get zope.site, which wasn't in Zope 3.3 yet.
zope.site relies on zope.container. You'll get that too, and it wasn't
in Zope 3.3.
So you are running happily and think everything works.
But wait. zope.app.container *is* in Zope 3.3. It has an implementation
of Container.
The *new* zope.app.container however doesn't have this implementation,
and instead imports (for backwards compatibility) from zope.container.
But wait. zope.app.component *is* in Zope 3.3. It has an implementation
of some stuff that's in zope.site now.
The *new* zope.app.component however doesn't have this implementation,
and instead imports (for backwards compatibility) from zope.container.
So zope.site doesn't depend on zope.app.component nor on
zope.app.container. But installing zope.site does affect the integrity
of your codebase. There are suddenly multiple duplicate implementations
around.
Now if some code does this:
>>> from zope.container import Container
and some other code does this:
>>> from zope.app.container.container import Container as OldContainer
then surprisingly enough we'll get this:
>>> Container is OldContainer
False
unless people also installed a newer version of zope.app.container.
This can get tremendously confusing and tests can break for rather
subtle reasons. And this is just the case I'm familiar with. There are
probably a lot more issues like this that I don't know about.
So I see two responses for Plone developers:
* they know that they need new versions of zope.app.container and
zope.app.component too and require people to upgrade those too. This
might work fairly well, but does require the upgrade of more than just a
*few* packages, with the increased risk of breakage.
* they try to ignore this issue (because they don't know or care) and
things may continue to work. Perhaps nobody ever uses Container in Plone
anyway, and in practice everything's just fine. Based on a lot of luck.
Regards,
Martijn
More information about the Zope-Dev
mailing list