Log message for revision 66043:
- ZClasses are deprecated and should no longer be used. In addition
any code related to the ZClasses (re)distribution mechanism is
removed.
Changed:
U Zope/trunk/doc/CHANGES.txt
U Zope/trunk/lib/python/App/Product.py
-=-
Modified: Zope/trunk/doc/CHANGES.txt
===
--- Zope/trunk/doc/CHANGES.txt 2006-03-15 16:27:07 UTC (rev 66042)
+++ Zope/trunk/doc/CHANGES.txt 2006-03-15 16:52:15 UTC (rev 66043)
@@ -30,7 +30,9 @@
- removed ZopeTutorial (Elvis is now really dead)
- - ZClasses are deprecated and should no longer be used.
+ - ZClasses are deprecated and should no longer be used. In addition
+any code related to the ZClasses (re)distribution mechanism is
+removed.
- ZGadyFlyDA/Gadfly is deprecated
Modified: Zope/trunk/lib/python/App/Product.py
===
--- Zope/trunk/lib/python/App/Product.py2006-03-15 16:27:07 UTC (rev
66042)
+++ Zope/trunk/lib/python/App/Product.py2006-03-15 16:52:15 UTC (rev
66043)
@@ -94,7 +94,6 @@
icon='p_/Product_icon'
version=''
configurable_objects_=()
-redistributable=0
import_error_=None
_isBeingUsedAsAMethod_=1
@@ -136,16 +135,9 @@
manage_options=(
(Folder.manage_options[0],) +
-tuple(Folder.manage_options[2:]) +
-(
-{'label':'Distribution', 'action':'manage_distributionView',
- 'help':('OFSP','Product_Distribution.stx')},
+tuple(Folder.manage_options[2:])
)
-)
-manage_distributionView=Globals.DTMLFile(
-'dtml/distributionView',globals())
-
_properties=Folder._properties+(
{'id':'version', 'type': 'string'},
)
@@ -186,99 +178,7 @@
Return the URL for the destination for factory output
return self.REQUEST['BASE4']
-def manage_distribute(self, version, RESPONSE, configurable_objects=[],
- redistributable=0):
-Set the product up to create a distribution and give a link
-if self.__dict__.has_key('manage_options'):
-raise TypeError, 'This product is bnot/b redistributable.'
-self.version=version=version.strip()
-self.configurable_objects_=configurable_objects
-self.redistributable=redistributable
-RESPONSE.redirect('Distributions/%s-%s.tar.gz' %
- (quote(self.id), quote(version)))
-def _distribution(self):
-# Return a distribution
-if self.__dict__.has_key('manage_options'):
-raise TypeError, 'This product is bnot/b redistributable.'
-
-id=self.id
-
-import rotor
-import tar
-rot=rotor.newrotor(id+' shshsh')
-ar=tar.tgzarchive(%s-%s % (id, self.version))
-prefix=Products/%s/ % self.id
-
-# __init__.py
-ar.add(prefix+__init__.py,
- '''Product %s
- ''' % id
- )
-
-# Extensions
-pp=id+'.'
-lpp=len(pp)
-ed=os.path.join(getConfiguration().instancehome,'Extensions')
-if os.path.exists(ed):
-for name in os.listdir(ed):
-suffix=''
-if name[:lpp]==pp:
-path=os.path.join(ed, name)
-try:
-f=open(path)
-data=f.read()
-f.close()
-if name[-3:]=='.py':
-data=rot.encrypt(zlib.compress(data))
-suffix='p'
-except: data=None
-if data:
-ar.add(%sExtensions/%s%s %
- (prefix,name[lpp:],suffix),
- data)
-
-# version.txt
-ar.add(prefix+'version.txt', self.version)
-
-# product.dat
-f=CompressedOutputFile(rot)
-if self.redistributable:
-# Since it's redistributable, make all objects configurable.
-objectList = self._objects
-else:
-objectList = tuple(filter(
-lambda o, obs=self.configurable_objects_:
-o['id'] in obs,
-self._objects))
-meta={
-'_objects': objectList,
-'redistributable': self.redistributable,
-}
-f.write(cPickle.dumps(meta,1))
-
-self._p_jar.exportFile(self._p_oid, f)
-ar.add(prefix+'product.dat', f.getdata())
-
-ar.finish()
-return str(ar)
-
-class Distributions(Acquisition.Explicit):
-Product Distributions
-
-def __bobo_traverse__(self, REQUEST, name):
-if name[-7:] != '.tar.gz':
-raise ValueError, 'Invalid Name: %s' % escape(name)
-l=name.find('-')
-id,