[Zope3-dev] Re: give ability to get rid of deprecated code

2006-09-12 Thread Florent Xicluna
Benji York benji at zope.com writes:

 
 Florent Xicluna wrote:
  I am working on a 'light' version of Zope
 
 You may want to contribute toward eggifying Zope 3 for the next 
 release.  Once Z3 is sufficiently broken into individual components, 
 projects can use as few (or many) as they need.


sure!

By the way, I have to read more about eggs usage and benefits.
First experience with eggs was not easy, because the server where I need to
install egg was not connected to internet.

-- Florent

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: give ability to get rid of deprecated code

2006-09-12 Thread Baiju M

On 9/12/06, Florent Xicluna [EMAIL PROTECTED] wrote:

Benji York benji at zope.com writes:


 Florent Xicluna wrote:
  I am working on a 'light' version of Zope

 You may want to contribute toward eggifying Zope 3 for the next
 release.  Once Z3 is sufficiently broken into individual components,
 projects can use as few (or many) as they need.


sure!

By the way, I have to read more about eggs usage and benefits.
First experience with eggs was not easy, because the server where I need to
install egg was not connected to internet.


Few Zope eggs are here : http://download.zope.org/distribution/

--
Baiju M
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: give ability to get rid of deprecated code

2006-09-11 Thread Florent Xicluna
Florent wrote:

 I propose to patch the 'trunk' in order to allow removing of these packages.
 Here are the  proposed changes:
 - catch 'ImportError' when we make use of zope.app.skins
 - introduce ZCML feature 'deprecatedlayers' which is 'on' by default
   and can be disabled
 - add a 'zcml:condition=have deprecatedlayers' on each layer directive
 


Below is the tested patch.

-- Florent



Index: zope/app/apidoc/browser/configure.zcml
===
--- zope/app/apidoc/browser/configure.zcml  (revision 70097)
+++ zope/app/apidoc/browser/configure.zcml  (working copy)
@@ -1,10 +1,12 @@
 configure
 xmlns=http://namespaces.zope.org/browser;
 xmlns:zope=http://namespaces.zope.org/zope;
+xmlns:zcml=http://namespaces.zope.org/zcml;
 i18n_domain=zope
 
   !-- BBB 2006/02/18, to be removed after 12 months --
   layer
+  zcml:condition=have deprecatedlayers
   name=apidoc
   interface=.skin.apidoc
   bbb_aware=true
Index: zope/app/apidoc/browser/skin.py
===
--- zope/app/apidoc/browser/skin.py (revision 70078)
+++ zope/app/apidoc/browser/skin.py (working copy)
@@ -27,5 +27,8 @@
 The `APIDOC` skin.
 
 # BBB 2006/02/18, to be removed after 12 months
-import zope.app.skins
-zope.app.skins.set('APIDOC', APIDOC)
+try:
+import zope.app.skins
+zope.app.skins.set('APIDOC', APIDOC)
+except ImportError:
+pass
Index: zope/app/basicskin/__init__.py
===
--- zope/app/basicskin/__init__.py  (revision 70078)
+++ zope/app/basicskin/__init__.py  (working copy)
@@ -23,5 +23,8 @@
 nothing else
 
 # BBB 2006/02/18, to be removed after 12 months
-import zope.app.skins
-zope.app.skins.set('Basic', IBasicSkin)
+try:
+import zope.app.skins
+zope.app.skins.set('Basic', IBasicSkin)
+except ImportError:
+pass
Index: zope/app/boston/__init__.py
===
--- zope/app/boston/__init__.py (revision 70078)
+++ zope/app/boston/__init__.py (working copy)
@@ -34,8 +34,11 @@
 
 
 # BBB 2006/02/18, to be removed after 12 months
-import zope.app.skins
-zope.app.skins.set('Boston', Boston)
+try:
+import zope.app.skins
+zope.app.skins.set('Boston', Boston)
+except ImportError:
+pass
 
 class IHead(IViewletManager):
 Head viewlet manager.
Index: zope/app/boston/configure.zcml
===
--- zope/app/boston/configure.zcml  (revision 70078)
+++ zope/app/boston/configure.zcml  (working copy)
@@ -7,6 +7,7 @@
 
   !-- BBB 2006/02/18, to be removed after 12 months --
   layer
+  zcml:condition=have deprecatedlayers
   name=boston
   interface=zope.app.boston.boston
   bbb_aware=true
Index: zope/app/css/__init__.py
===
--- zope/app/css/__init__.py(revision 70078)
+++ zope/app/css/__init__.py(working copy)
@@ -31,5 +31,8 @@
 
 
 # BBB 2006/02/18, to be removed after 12 months
-import zope.app.skins
-zope.app.skins.set('CSS', CSS)
+try:
+import zope.app.skins
+zope.app.skins.set('CSS', CSS)
+except ImportError:
+pass
Index: zope/app/css/configure.zcml
===
--- zope/app/css/configure.zcml (revision 70097)
+++ zope/app/css/configure.zcml (working copy)
@@ -1,9 +1,11 @@
 configure
 xmlns=http://namespaces.zope.org/zope;
-xmlns:browser=http://namespaces.zope.org/browser;
+xmlns:browser=http://namespaces.zope.org/browser;
+xmlns:zcml=http://namespaces.zope.org/zcml;
 
   !-- BBB 2006/02/18, to be removed after 12 months --
   browser:layer
+  zcml:condition=have deprecatedlayers
   name=css
   interface=zope.app.css.layer
   bbb_aware=true
Index: zope/app/debugskin/__init__.py
===
--- zope/app/debugskin/__init__.py  (revision 70078)
+++ zope/app/debugskin/__init__.py  (working copy)
@@ -26,5 +26,8 @@
 Rotterdam-based skin with debug functionality
 
 # BBB 2006/02/18, to be removed after 12 months
-import zope.app.skins
-zope.app.skins.set('Debug', IDebugSkin)
+try:
+import zope.app.skins
+zope.app.skins.set('Debug', IDebugSkin)
+except ImportError:
+pass
Index: zope/app/debugskin/configure.zcml
===
--- zope/app/debugskin/configure.zcml   (revision 70078)
+++ zope/app/debugskin/configure.zcml   (working copy)
@@ -1,10 +1,12 @@
 configure
 xmlns=http://namespaces.zope.org/browser;
 xmlns:zope=http://namespaces.zope.org/zope;
+xmlns:zcml=http://namespaces.zope.org/zcml;
 
 
   !-- BBB 2006/02/18, to be removed after 12 months --
   layer
+  zcml:condition=have deprecatedlayers
   

Re: [Zope3-dev] Re: give ability to get rid of deprecated code

2006-09-11 Thread Gary Poster


On Sep 11, 2006, at 5:22 PM, Florent Xicluna wrote:


Florent wrote:

I propose to patch the 'trunk' in order to allow removing of these  
packages.

Here are the  proposed changes:
- catch 'ImportError' when we make use of zope.app.skins
- introduce ZCML feature 'deprecatedlayers' which is 'on' by default
  and can be disabled
- add a 'zcml:condition=have deprecatedlayers' on each layer  
directive





Below is the tested patch.

-- Florent


Hi Florent.  Thanks for this work.  While I agree with Benji that it  
would be great if you could direct your general efforts in the  
direction of eggs, I think that the changes you list here look quite  
reasonable.  I also think that the goal of making these packages more  
independent fits in quite nicely with the egg-ification efforts.


+1 for this to go in the trunk.  Hopefully this will spur someone  
else to give your patch an evaluation.


Gary
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com