Ticket #10877 (closed PLIP: fixed)

Opened 6 years ago

Last modified 5 years ago

Separate Products.CMFPlone from the Plone egg and its optional dependencies

Reported by: ldr Owned by: ldr
Priority: minor Milestone: 4.1
Component: General Version:
Keywords: Cc: plip-advisories@…

Description (last modified by ldr) (diff)

Proposer: Laurence Rowe
Seconder: None as yet

Motivation

The Plone package currently lists a number of dependencies which are not installed by default. We should make it possible for advanced integrators to avoid including that code at all.

Assumptions

Optional dependencies covered by this proposal:

  • Products.CMFPlacefulWorkflow
  • kupu
  • plone.app.openid
  • plone.app.iterate
  • plone.portlet.collection
  • plone.portlet.static
  • plone.contentrules / plone.app.contentrules
  • and any other optional packages added during 4.1.

These dependencies potentially become optional with a little extra work:

  • plone.app.redirector
  • plone.app.kss / kss.core / archetypes.kss
  • plone.app.upgrade

Products.ATContentTypes and Archetypes are out of scope for this proposal as they are currently too closely entwined with Products.CMFPlone.

Proposal & Implementation

Rename the existing Plone egg to Products.CMFPlone and create a new Plone egg depending on Products.CMFPlone along with the optional dependencies.

Deliverables

  • Rename the existing Plone egg to Products.CMFPlone. In svn, Plone/trunk is moved to Products.CMFPlone/trunk.
  • Creation of new Plone egg. This should not contain any code, only dependencies in its setup.py.
  • Move the optional dependencies from Products.CMFPlone to Plone.

Risks

  • Existing packages that depend on Plone will need to depend on Products.CMFPlone instead. An empty Products.CMFPlone 4.0 egg depending on Plone>=4.0,<4.0.99 may need to be released.
  • Moving of Plone/trunk may cause difficulties for other plip implementors wishing to create branches for their work. It's probably best that the renaming is done early, moving dependencies and testing that they are truly optional can be done later in the cycle.

Participants

  • Laurence Rowe (svn: ldr, irc: elro)

Progress

Should be an immediate change. Other plips will be branching Plone, it'll be a mess to merge.

  • Moved kupu, iterate, openid and Placeful Workflow to Plone egg ( revision logs)

Change History

comment:1 Changed 6 years ago by optilude

+1

I think plone.app.redirector should be low-hanging fruit to separate out as well.

Martin

comment:2 Changed 6 years ago by davisagli

+1.

I submitted the related #10888 regarding making KSS optional.

comment:3 follow-up: ↓ 4 Changed 6 years ago by witsch

another +1, and i'm pretty sure p.a.linkintegrity can be added to the list as well — at least i've tried to write the integration bits in a way so that the egg can simply be removed...

comment:4 in reply to: ↑ 3 Changed 6 years ago by witsch

Replying to witsch:

[...] at least i've tried to write the integration bits in a way so that the egg can simply be removed...

well, apparently i didn't... but nevertheless, with:

  • coredev/branches/4.0/tests.cfg

    a b eggs = 
    6060    plone.app.kss 
    6161    plone.app.layout 
    6262    plone.app.locales 
    63     plone.app.linkintegrity [test] 
    6463    plone.app.openid 
    6564    plone.app.portlets 
    6665    plone.app.redirector 

and:

  • src/Plone/Products/CMFPlone/PloneTool.py

    a b from Products.CMFPlone.utils import base_hasattr 
    4141from Products.CMFPlone.utils import safe_hasattr 
    4242from Products.statusmessages.interfaces import IStatusMessage 
    4343from AccessControl.requestmethod import postonly 
    44 from plone.app.linkintegrity.exceptions import LinkIntegrityNotificationException 
     44 
     45try: 
     46    from plone.app.linkintegrity.exceptions import LinkIntegrityNotificationException 
     47except ImportError: 
     48    class LinkIntegrityNotificationException(Exception): 
     49        pass 
    4550 
    4651# BBB Plone 4.0 
    4752from zope.deprecation import __show__ 
  • src/Plone/Products/CMFPlone/configure.zcml

    a b  
    2020  <include package="plone.app.iterate" /> 
    2121  <include package="plone.app.jquerytools" /> 
    2222  <include package="plone.app.layout" /> 
    23   <include package="plone.app.linkintegrity" /> 
    2423  <include package="plone.app.locales" /> 
    2524  <include package="plone.app.portlets" /> 
    2625  <include package="plone.app.redirector" /> 
  • src/Plone/setup.py

    a b setup(name='Plone', 
    8686          'plone.app.jquerytools', 
    8787          'plone.app.kss', 
    8888          'plone.app.layout >=1.1.7dev-r23744', 
    89           'plone.app.linkintegrity >=1.0.3', 
    9089          'plone.app.locales', 
    9190          'plone.app.openid', 
    9291          'plone.app.portlets', 

p.a.linkintegrity isn't missed by anyone and bin/alltests happily passes as well... :)

comment:5 Changed 6 years ago by ldr

  • Status changed from new to assigned
  • Description modified (diff)

comment:6 Changed 6 years ago by ldr

  • Description modified (diff)

comment:7 Changed 6 years ago by esteele

Your PLIP has been accepted for consideration for Plone 4.1.

Framework Team voting on this PLIP was: Alec +0 Craig +1 Elizabeth +1 Laurence -- Martijn +1 Matthew +1 Rob +1 Ross +1

Since this PLIP involves heavy modification to the Plone core package, we'd appreciate this being done as soon as possible to simplify the development and merging of other PLIPs. Announce its readiness here once your implementation is ready for review.

comment:8 Changed 6 years ago by optilude

(In [39249]) Don't depend on the Plone egg. Refs #9473 and refs #10877

comment:9 Changed 6 years ago by optilude

(In [39250]) Don't depend on the Plone egg. Refs #9473 and refs #10877

comment:11 Changed 6 years ago by cah190

  • Cc plip-advisories@… added

comment:12 Changed 5 years ago by ldr

  • Description modified (diff)

I've now moved to the Plone egg the following add-ons:

  • Products.CMFPlacefulWorkflow
  • kupu
  • plone.app.openid / plone.openid
  • plone.app.iterate

The other candidates for moving require changes to Plone site creation as they are installed by default. I'm probably not going to get around to changing them in time for 4.1:

  • plone.portlet.collection
  • plone.portlet.static
  • plone.contentrules / plone.app.contentrules
  • plonetheme.classic

comment:13 Changed 5 years ago by esteele

  • Status changed from assigned to closed
  • Resolution set to fixed

Merged.

comment:14 Changed 4 years ago by davisagli

  • Component changed from Infrastructure to General
Note: See TracTickets for help on using tickets.