zope.app.zopeappgenerations-3.5.1/0000755000177100020040000000000011504415035017052 5ustar menesismenesiszope.app.zopeappgenerations-3.5.1/CHANGES.txt0000644000177100020040000000063311504414774020676 0ustar menesismenesis======= CHANGES ======= 3.5.1 (2010-12-22) ------------------ - Fixed evolve3 that used no longer existing API. 3.5.0 (2009-04-05) ------------------ - Moved ``getRootFolder`` utility method from ``zope.app.zopeappgenerations`` to ``zope.app.generations.utility``. - Fixed author email and home page address. 3.4.0 (2007-10-29) ------------------ - Initial release independent of the main Zope tree. zope.app.zopeappgenerations-3.5.1/PKG-INFO0000644000177100020040000000273411504415035020155 0ustar menesismenesisMetadata-Version: 1.0 Name: zope.app.zopeappgenerations Version: 3.5.1 Summary: Zope Application ZODB Update Generations Home-page: http://pypi.python.org/pypi/zope.app.zopeappgenerations Author: Zope Foundation and Contributors Author-email: zope-dev@zope.org License: ZPL 2.1 Description: This package provides the ZODB schema update generations for all components included in the classic Zope 3 releases. ======= CHANGES ======= 3.5.1 (2010-12-22) ------------------ - Fixed evolve3 that used no longer existing API. 3.5.0 (2009-04-05) ------------------ - Moved ``getRootFolder`` utility method from ``zope.app.zopeappgenerations`` to ``zope.app.generations.utility``. - Fixed author email and home page address. 3.4.0 (2007-10-29) ------------------ - Initial release independent of the main Zope tree. Keywords: zope3 zodb generation update Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Zope Public License Classifier: Programming Language :: Python Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Topic :: Internet :: WWW/HTTP Classifier: Framework :: Zope3 zope.app.zopeappgenerations-3.5.1/README.txt0000644000177100020040000000016511504414774020563 0ustar menesismenesisThis package provides the ZODB schema update generations for all components included in the classic Zope 3 releases. zope.app.zopeappgenerations-3.5.1/setup.py0000644000177100020040000000435411504414774020603 0ustar menesismenesis############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Setup for zope.app.zopeappgenerations package """ import os from setuptools import setup, find_packages def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() setup(name='zope.app.zopeappgenerations', version='3.5.1', author='Zope Foundation and Contributors', author_email='zope-dev@zope.org', description='Zope Application ZODB Update Generations', long_description=( read('README.txt') + '\n\n' + read('CHANGES.txt') ), keywords = "zope3 zodb generation update", classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: Zope Public License', 'Programming Language :: Python', 'Natural Language :: English', 'Operating System :: OS Independent', 'Topic :: Internet :: WWW/HTTP', 'Framework :: Zope3'], url='http://pypi.python.org/pypi/zope.app.zopeappgenerations', license='ZPL 2.1', packages=find_packages('src'), package_dir = {'': 'src'}, namespace_packages=['zope', 'zope.app'], install_requires=['setuptools', 'zope.annotation', 'zope.app.authentication', 'zope.app.component', 'zope.app.generations >= 3.5', 'zope.copypastemove', 'zope.dublincore', ], include_package_data = True, zip_safe = False, ) zope.app.zopeappgenerations-3.5.1/COPYRIGHT.txt0000644000177100020040000000004011504414774021166 0ustar menesismenesisZope Foundation and Contributorszope.app.zopeappgenerations-3.5.1/LICENSE.txt0000644000177100020040000000402611504414774020710 0ustar menesismenesisZope Public License (ZPL) Version 2.1 A copyright notice accompanies this license document that identifies the copyright holders. This license has been certified as open source. It has also been designated as GPL compatible by the Free Software Foundation (FSF). Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions in source code must retain the accompanying copyright notice, this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the accompanying copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Names of the copyright holders must not be used to endorse or promote products derived from this software without prior written permission from the copyright holders. 4. The right to distribute this software or to use it for any purpose does not give you the right to use Servicemarks (sm) or Trademarks (tm) of the copyright holders. Use of them is covered by separate agreement with the copyright holders. 5. If any files are modified, you must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. Disclaimer THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. zope.app.zopeappgenerations-3.5.1/bootstrap.py0000644000177100020040000000330211504414774021450 0ustar menesismenesis############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Bootstrap a buildout-based project Simply run this script in a directory containing a buildout.cfg. The script accepts buildout command-line options, so you can use the -c option to specify an alternate configuration file. """ import os, shutil, sys, tempfile, urllib2 tmpeggs = tempfile.mkdtemp() ez = {} exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' ).read() in ez ez['use_setuptools'](to_dir=tmpeggs, download_delay=0) import pkg_resources cmd = 'from setuptools.command.easy_install import main; main()' if sys.platform == 'win32': cmd = '"%s"' % cmd # work around spawn lamosity on windows ws = pkg_resources.working_set assert os.spawnle( os.P_WAIT, sys.executable, sys.executable, '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout', dict(os.environ, PYTHONPATH= ws.find(pkg_resources.Requirement.parse('setuptools')).location ), ) == 0 ws.add_entry(tmpeggs) ws.require('zc.buildout') import zc.buildout.buildout zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap']) shutil.rmtree(tmpeggs) zope.app.zopeappgenerations-3.5.1/setup.cfg0000644000177100020040000000007311504415035020673 0ustar menesismenesis[egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 zope.app.zopeappgenerations-3.5.1/src/0000755000177100020040000000000011504415035017641 5ustar menesismenesiszope.app.zopeappgenerations-3.5.1/src/zope/0000755000177100020040000000000011504415035020616 5ustar menesismenesiszope.app.zopeappgenerations-3.5.1/src/zope/__init__.py0000644000177100020040000000031011504414774022732 0ustar menesismenesis# this is a namespace package try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: import pkgutil __path__ = pkgutil.extend_path(__path__, __name__) zope.app.zopeappgenerations-3.5.1/src/zope/app/0000755000177100020040000000000011504415035021376 5ustar menesismenesiszope.app.zopeappgenerations-3.5.1/src/zope/app/zopeappgenerations/0000755000177100020040000000000011504415035025313 5ustar menesismenesiszope.app.zopeappgenerations-3.5.1/src/zope/app/zopeappgenerations/evolve4.py0000644000177100020040000000152611504414773027265 0ustar menesismenesis############################################################################## # # Copyright (c) 2004 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Evolve local site managers """ __docformat__ = "reStructuredText" from zope.app.generations.utility import getRootFolder def evolve(context): getRootFolder(context).getSiteManager()._evolve_to_generation_4() zope.app.zopeappgenerations-3.5.1/src/zope/app/zopeappgenerations/__init__.py0000644000177100020040000000173211504414773027437 0ustar menesismenesis############################################################################## # # Copyright (c) 2004 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Zope Application Server Generations """ __docformat__ = "reStructuredText" from zope.app.generations.generations import SchemaManager # BBB import from zope.app.generations.utility import getRootFolder key = 'zope.app.zopeappgenerations' ZopeAppSchemaManager = SchemaManager( minimum_generation=1, generation=5, package_name=key) zope.app.zopeappgenerations-3.5.1/src/zope/app/zopeappgenerations/evolve5.py0000644000177100020040000000335511504414773027270 0ustar menesismenesis############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Evolve moved Zope Dublin Core Annotatable data """ __docformat__ = "reStructuredText" from zope.annotation.interfaces import IAnnotatable, IAnnotations from zope.dublincore.interfaces import IWriteZopeDublinCore from zope.dublincore.annotatableadapter import ZDCAnnotatableAdapter from zope.dublincore.annotatableadapter import DCkey from zope.app.generations.utility import findObjectsProviding, getRootFolder generation = 5 def evolve(context): root = getRootFolder(context) for obj in findObjectsProviding(root, IAnnotatable): dc = IWriteZopeDublinCore(obj) if isinstance(dc, ZDCAnnotatableAdapter): # simply mark the ZDCAnnotationData object as dirty so # that it gets repickled dc._mapping._p_activate() dc._mapping._p_changed = True # also mark the object holding a reference to it (the # annotations mapping) as dirty. It contains a reference # to the old class path for ghosts annotations = IAnnotations(obj) if DCkey in annotations: annotations[DCkey] = annotations[DCkey] zope.app.zopeappgenerations-3.5.1/src/zope/app/zopeappgenerations/evolve2.py0000644000177100020040000000311311504414773027255 0ustar menesismenesis############################################################################## # # Copyright (c) 2004 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Evolve the ZODB from Zope 3.1 to a Zope 3.2 compatible format. """ __docformat__ = "reStructuredText" from zope.app.authentication.principalfolder import IInternalPrincipal from zope.app.component.interfaces import ISite from zope.app.generations.utility import findObjectsProviding, getRootFolder generation = 2 def evolve(context): """Evolve the ZODB from a Zope 3.1 to a 3.2 compatible format. - Converts all internal principals to use new password managers. """ root = getRootFolder(context) for site in findObjectsProviding(root, ISite): sm = site.getSiteManager() for principal in findObjectsProviding(sm, IInternalPrincipal): if not hasattr(principal, "_passwordManagerName"): principal._passwordManagerName = "Plain Text" if not hasattr(principal, "_password"): principal._password = principal.__dict__["password"] del principal.__dict__["password"] zope.app.zopeappgenerations-3.5.1/src/zope/app/zopeappgenerations/configure.zcml0000644000177100020040000000031411504414773030171 0ustar menesismenesis zope.app.zopeappgenerations-3.5.1/src/zope/app/zopeappgenerations/evolve3.py0000644000177100020040000001054411504414773027264 0ustar menesismenesis############################################################################## # # Copyright (c) 2004 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Evolve existing PAU group folders. They should be used as contained plugins rather than registered plugins. """ __docformat__ = "reStructuredText" import zope.app.authentication.interfaces from zope.app.authentication import groupfolder from zope.app.component.interfaces import ISite from zope.app.generations.utility import findObjectsProviding, getRootFolder from zope.component import getUtilitiesFor from zope.copypastemove.interfaces import IObjectMover generation = 3 def evolve(context): """Evolve existing PAUs and group folders. - Group folders should no longer be registered. - PAUs that use group folders should use their contents name, not their (formerly) registered name. Group folders used by multiple PAUs were not supported, and are not supported with this evolution. """ root = getRootFolder(context) for site in findObjectsProviding(root, ISite): sm = site.getSiteManager() for pau in findObjectsProviding( sm, zope.app.authentication.interfaces.IPluggableAuthentication): for nm, util in getUtilitiesFor( zope.app.authentication.interfaces.IAuthenticatorPlugin, context=pau): if groupfolder.IGroupFolder.providedBy(util): if util.__parent__ is not pau: raise RuntimeError( "I don't know how to migrate your database: " "each group folder should only be within the " "Pluggable Authentication utility that uses it") # we need to remove this registration regs = [r for r in sm.registeredUtilities() if r.component == util] if len(regs) != 1: raise RuntimeError( "I don't know how to migrate your database: " "you should only have registered your group " "folder as an IAuthenticatorPlugin, but it looks " "like it's registered for something additional " "that I don't expect") r = regs[0] sm.unregisterUtility( util, zope.app.authentication.interfaces.IAuthenticatorPlugin, nm) if r.name in pau.authenticatorPlugins: if util.__name__ != r.name: # else no-op plugins = list(pau.authenticatorPlugins) if util.__name__ in pau.authenticatorPlugins: # argh! another active plugin's name is # the same as this group folder's # __name__. That means we need to choose # a new name that is also not in # authenticatorPlugins and not in # pau.keys()... ct = 0 nm = '%s_%d' % (util.__name__, ct) while (nm in pau.authenticatorPlugins or nm in pau): ct += 1 nm = '%s_%d' % (util.__name__, ct) IObjectMover(util).moveTo(pau, nm) plugins[plugins.index(r.name)] = util.__name__ pau.authenticatorPlugins = tuple(plugins) for k, r in pau.registrationManager.items(): if groupfolder.IGroupFolder.providedBy(r.component): del pau.registrationManager[k] zope.app.zopeappgenerations-3.5.1/src/zope/app/__init__.py0000644000177100020040000000031011504414773023511 0ustar menesismenesis# this is a namespace package try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: import pkgutil __path__ = pkgutil.extend_path(__path__, __name__) zope.app.zopeappgenerations-3.5.1/src/zope.app.zopeappgenerations.egg-info/0000755000177100020040000000000011504415035027003 5ustar menesismenesiszope.app.zopeappgenerations-3.5.1/src/zope.app.zopeappgenerations.egg-info/PKG-INFO0000644000177100020040000000273411504415035030106 0ustar menesismenesisMetadata-Version: 1.0 Name: zope.app.zopeappgenerations Version: 3.5.1 Summary: Zope Application ZODB Update Generations Home-page: http://pypi.python.org/pypi/zope.app.zopeappgenerations Author: Zope Foundation and Contributors Author-email: zope-dev@zope.org License: ZPL 2.1 Description: This package provides the ZODB schema update generations for all components included in the classic Zope 3 releases. ======= CHANGES ======= 3.5.1 (2010-12-22) ------------------ - Fixed evolve3 that used no longer existing API. 3.5.0 (2009-04-05) ------------------ - Moved ``getRootFolder`` utility method from ``zope.app.zopeappgenerations`` to ``zope.app.generations.utility``. - Fixed author email and home page address. 3.4.0 (2007-10-29) ------------------ - Initial release independent of the main Zope tree. Keywords: zope3 zodb generation update Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Zope Public License Classifier: Programming Language :: Python Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Topic :: Internet :: WWW/HTTP Classifier: Framework :: Zope3 zope.app.zopeappgenerations-3.5.1/src/zope.app.zopeappgenerations.egg-info/top_level.txt0000644000177100020040000000000511504415035031530 0ustar menesismenesiszope zope.app.zopeappgenerations-3.5.1/src/zope.app.zopeappgenerations.egg-info/SOURCES.txt0000644000177100020040000000142011504415035030664 0ustar menesismenesisCHANGES.txt COPYRIGHT.txt LICENSE.txt README.txt bootstrap.py buildout.cfg setup.py src/zope/__init__.py src/zope.app.zopeappgenerations.egg-info/PKG-INFO src/zope.app.zopeappgenerations.egg-info/SOURCES.txt src/zope.app.zopeappgenerations.egg-info/dependency_links.txt src/zope.app.zopeappgenerations.egg-info/namespace_packages.txt src/zope.app.zopeappgenerations.egg-info/not-zip-safe src/zope.app.zopeappgenerations.egg-info/requires.txt src/zope.app.zopeappgenerations.egg-info/top_level.txt src/zope/app/__init__.py src/zope/app/zopeappgenerations/__init__.py src/zope/app/zopeappgenerations/configure.zcml src/zope/app/zopeappgenerations/evolve2.py src/zope/app/zopeappgenerations/evolve3.py src/zope/app/zopeappgenerations/evolve4.py src/zope/app/zopeappgenerations/evolve5.pyzope.app.zopeappgenerations-3.5.1/src/zope.app.zopeappgenerations.egg-info/namespace_packages.txt0000644000177100020040000000001611504415035033333 0ustar menesismenesiszope zope.app zope.app.zopeappgenerations-3.5.1/src/zope.app.zopeappgenerations.egg-info/not-zip-safe0000644000177100020040000000000111504414774031242 0ustar menesismenesis zope.app.zopeappgenerations-3.5.1/src/zope.app.zopeappgenerations.egg-info/dependency_links.txt0000644000177100020040000000000111504415035033051 0ustar menesismenesis zope.app.zopeappgenerations-3.5.1/src/zope.app.zopeappgenerations.egg-info/requires.txt0000644000177100020040000000020411504415035031377 0ustar menesismenesissetuptools zope.annotation zope.app.authentication zope.app.component zope.app.generations >= 3.5 zope.copypastemove zope.dublincorezope.app.zopeappgenerations-3.5.1/buildout.cfg0000644000177100020040000000015611504414774021375 0ustar menesismenesis[buildout] develop = . parts = test [test] recipe = zc.recipe.testrunner eggs = zope.app.zopeappgenerations