[Checkins] SVN: cipher.configstore/ initial upload
Adam Groszer
cvs-admin at zope.org
Fri Apr 6 09:30:10 UTC 2012
Log message for revision 125000:
initial upload
Changed:
A cipher.configstore/branches/
A cipher.configstore/tags/
A cipher.configstore/trunk/
A cipher.configstore/trunk/CHANGES.txt
A cipher.configstore/trunk/COPYRIGHT.txt
A cipher.configstore/trunk/LICENSE.txt
A cipher.configstore/trunk/README.txt
A cipher.configstore/trunk/bootstrap.py
A cipher.configstore/trunk/buildout.cfg
A cipher.configstore/trunk/setup.py
A cipher.configstore/trunk/src/
A cipher.configstore/trunk/src/cipher/
A cipher.configstore/trunk/src/cipher/__init__.py
A cipher.configstore/trunk/src/cipher/configstore/
A cipher.configstore/trunk/src/cipher/configstore/__init__.py
A cipher.configstore/trunk/src/cipher/configstore/configstore.py
A cipher.configstore/trunk/src/cipher/configstore/configstore.txt
A cipher.configstore/trunk/src/cipher/configstore/interfaces.py
A cipher.configstore/trunk/src/cipher/configstore/tests.py
A cipher.configstore/trunk/ztk-versions-1.0.1.cfg
-=-
Property changes on: cipher.configstore/trunk
___________________________________________________________________
Added: svn:ignore
+ .installed.cfg
bin
develop-eggs
parts
Added: cipher.configstore/trunk/CHANGES.txt
===================================================================
--- cipher.configstore/trunk/CHANGES.txt (rev 0)
+++ cipher.configstore/trunk/CHANGES.txt 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1,25 @@
+=======
+CHANGES
+=======
+
+1.2.0 (unreleased)
+------------------
+
+- ...
+
+1.1.1 (2012-02-27)
+------------------
+
+- Make sure that setting the parent explicitly on items created in the
+ collection config store is optionally and overwritable.
+
+
+1.1.0 (2012-01-29)
+------------------
+
+- Feature Added dump/load support for ``datetime.timedelta`` objects.
+
+1.0.0
+-----
+
+- Initial release.
Property changes on: cipher.configstore/trunk/CHANGES.txt
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
Added: cipher.configstore/trunk/COPYRIGHT.txt
===================================================================
--- cipher.configstore/trunk/COPYRIGHT.txt (rev 0)
+++ cipher.configstore/trunk/COPYRIGHT.txt 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1 @@
+Zope Foundation and Contributors
\ No newline at end of file
Property changes on: cipher.configstore/trunk/COPYRIGHT.txt
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
Added: cipher.configstore/trunk/LICENSE.txt
===================================================================
--- cipher.configstore/trunk/LICENSE.txt (rev 0)
+++ cipher.configstore/trunk/LICENSE.txt 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1,44 @@
+Zope 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.
Property changes on: cipher.configstore/trunk/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
Added: cipher.configstore/trunk/README.txt
===================================================================
--- cipher.configstore/trunk/README.txt (rev 0)
+++ cipher.configstore/trunk/README.txt 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1,5 @@
+cipher.configstore
+==================
+
+This module provides a small framework to store an object's state in a
+configuration file (human readable .ini).
Property changes on: cipher.configstore/trunk/README.txt
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
Added: cipher.configstore/trunk/bootstrap.py
===================================================================
--- cipher.configstore/trunk/bootstrap.py (rev 0)
+++ cipher.configstore/trunk/bootstrap.py 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1,259 @@
+##############################################################################
+#
+# 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.
+"""
+SETUPTOOLS_VERSION = '0.6c11'
+
+import os, shutil, sys, tempfile, textwrap, urllib, urllib2, subprocess
+from optparse import OptionParser
+
+if sys.platform == 'win32':
+ def quote(c):
+ if ' ' in c:
+ return '"%s"' % c # work around spawn lamosity on windows
+ else:
+ return c
+else:
+ quote = str
+
+# See zc.buildout.easy_install._has_broken_dash_S for motivation and comments.
+stdout, stderr = subprocess.Popen(
+ [sys.executable, '-Sc',
+ 'try:\n'
+ ' import ConfigParser\n'
+ 'except ImportError:\n'
+ ' print 1\n'
+ 'else:\n'
+ ' print 0\n'],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
+has_broken_dash_S = bool(int(stdout.strip()))
+
+# In order to be more robust in the face of system Pythons, we want to
+# run without site-packages loaded. This is somewhat tricky, in
+# particular because Python 2.6's distutils imports site, so starting
+# with the -S flag is not sufficient. However, we'll start with that:
+if not has_broken_dash_S and 'site' in sys.modules:
+ # We will restart with python -S.
+ args = sys.argv[:]
+ args[0:0] = [sys.executable, '-S']
+ args = map(quote, args)
+ os.execv(sys.executable, args)
+# Now we are running with -S. We'll get the clean sys.path, import site
+# because distutils will do it later, and then reset the path and clean
+# out any namespace packages from site-packages that might have been
+# loaded by .pth files.
+clean_path = sys.path[:]
+import site
+sys.path[:] = clean_path
+for k, v in sys.modules.items():
+ if (hasattr(v, '__path__') and
+ len(v.__path__)==1 and
+ not os.path.exists(os.path.join(v.__path__[0],'__init__.py'))):
+ # This is a namespace package. Remove it.
+ sys.modules.pop(k)
+
+is_jython = sys.platform.startswith('java')
+
+setuptools_source = 'http://peak.telecommunity.com/dist/ez_setup.py'
+distribute_source = 'http://python-distribute.org/distribute_setup.py'
+
+# parsing arguments
+def normalize_to_url(option, opt_str, value, parser):
+ if value:
+ if '://' not in value: # It doesn't smell like a URL.
+ value = 'file://%s' % (
+ urllib.pathname2url(
+ os.path.abspath(os.path.expanduser(value))),)
+ if opt_str == '--download-base' and not value.endswith('/'):
+ # Download base needs a trailing slash to make the world happy.
+ value += '/'
+ else:
+ value = None
+ name = opt_str[2:].replace('-', '_')
+ setattr(parser.values, name, value)
+
+usage = '''\
+[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
+
+Bootstraps a buildout-based project.
+
+Simply run this script in a directory containing a buildout.cfg, using the
+Python that you want bin/buildout to use.
+
+Note that by using --setup-source and --download-base to point to
+local resources, you can keep this script from going over the network.
+'''
+
+parser = OptionParser(usage=usage)
+parser.add_option("-v", "--version", dest="version",
+ help="use a specific zc.buildout version")
+parser.add_option("-d", "--distribute",
+ action="store_true", dest="use_distribute", default=False,
+ help="Use Distribute rather than Setuptools.")
+parser.add_option("--setup-source", action="callback", dest="setup_source",
+ callback=normalize_to_url, nargs=1, type="string",
+ help=("Specify a URL or file location for the setup file. "
+ "If you use Setuptools, this will default to " +
+ setuptools_source + "; if you use Distribute, this "
+ "will default to " + distribute_source +"."))
+parser.add_option("--download-base", action="callback", dest="download_base",
+ callback=normalize_to_url, nargs=1, type="string",
+ help=("Specify a URL or directory for downloading "
+ "zc.buildout and either Setuptools or Distribute. "
+ "Defaults to PyPI."))
+parser.add_option("--eggs",
+ help=("Specify a directory for storing eggs. Defaults to "
+ "a temporary directory that is deleted when the "
+ "bootstrap script completes."))
+parser.add_option("-t", "--accept-buildout-test-releases",
+ dest='accept_buildout_test_releases',
+ action="store_true", default=False,
+ help=("Normally, if you do not specify a --version, the "
+ "bootstrap script and buildout gets the newest "
+ "*final* versions of zc.buildout and its recipes and "
+ "extensions for you. If you use this flag, "
+ "bootstrap and buildout will get the newest releases "
+ "even if they are alphas or betas."))
+parser.add_option("-c", None, action="store", dest="config_file",
+ help=("Specify the path to the buildout configuration "
+ "file to be used."))
+
+options, args = parser.parse_args()
+
+# if -c was provided, we push it back into args for buildout's main function
+if options.config_file is not None:
+ args += ['-c', options.config_file]
+
+if options.eggs:
+ eggs_dir = os.path.abspath(os.path.expanduser(options.eggs))
+else:
+ eggs_dir = tempfile.mkdtemp()
+
+if options.setup_source is None:
+ if options.use_distribute:
+ options.setup_source = distribute_source
+ else:
+ options.setup_source = setuptools_source
+
+if options.accept_buildout_test_releases:
+ args.append('buildout:accept-buildout-test-releases=true')
+args.append('bootstrap')
+
+try:
+ import pkg_resources
+ import setuptools # A flag. Sometimes pkg_resources is installed alone.
+ if not hasattr(pkg_resources, '_distribute'):
+ raise ImportError
+except ImportError:
+ ez_code = urllib2.urlopen(
+ options.setup_source).read().replace('\r\n', '\n')
+ ez = {}
+ exec ez_code in ez
+ setup_args = dict(version=SETUPTOOLS_VERSION, to_dir=eggs_dir, download_delay=0)
+ if options.download_base:
+ setup_args['download_base'] = options.download_base
+ if options.use_distribute:
+ setup_args['no_fake'] = True
+ ez['use_setuptools'](**setup_args)
+ reload(sys.modules['pkg_resources'])
+ import pkg_resources
+ # This does not (always?) update the default working set. We will
+ # do it.
+ for path in sys.path:
+ if path not in pkg_resources.working_set.entries:
+ pkg_resources.working_set.add_entry(path)
+
+cmd = [quote(sys.executable),
+ '-c',
+ quote('from setuptools.command.easy_install import main; main()'),
+ '-mqNxd',
+ quote(eggs_dir)]
+
+if not has_broken_dash_S:
+ cmd.insert(1, '-S')
+
+find_links = options.download_base
+if not find_links:
+ find_links = os.environ.get('bootstrap-testing-find-links')
+if find_links:
+ cmd.extend(['-f', quote(find_links)])
+
+if options.use_distribute:
+ setup_requirement = 'distribute'
+else:
+ setup_requirement = 'setuptools'
+ws = pkg_resources.working_set
+setup_requirement_path = ws.find(
+ pkg_resources.Requirement.parse(setup_requirement)).location
+env = dict(
+ os.environ,
+ PYTHONPATH=setup_requirement_path)
+
+requirement = 'zc.buildout'
+version = options.version
+if version is None and not options.accept_buildout_test_releases:
+ # Figure out the most recent final version of zc.buildout.
+ import setuptools.package_index
+ _final_parts = '*final-', '*final'
+ def _final_version(parsed_version):
+ for part in parsed_version:
+ if (part[:1] == '*') and (part not in _final_parts):
+ return False
+ return True
+ index = setuptools.package_index.PackageIndex(
+ search_path=[setup_requirement_path])
+ if find_links:
+ index.add_find_links((find_links,))
+ req = pkg_resources.Requirement.parse(requirement)
+ if index.obtain(req) is not None:
+ best = []
+ bestv = None
+ for dist in index[req.project_name]:
+ distv = dist.parsed_version
+ if _final_version(distv):
+ if bestv is None or distv > bestv:
+ best = [dist]
+ bestv = distv
+ elif distv == bestv:
+ best.append(dist)
+ if best:
+ best.sort()
+ version = best[-1].version
+if version:
+ requirement = '=='.join((requirement, version))
+cmd.append(requirement)
+
+if is_jython:
+ import subprocess
+ exitcode = subprocess.Popen(cmd, env=env).wait()
+else: # Windows prefers this, apparently; otherwise we would prefer subprocess
+ exitcode = os.spawnle(*([os.P_WAIT, sys.executable] + cmd + [env]))
+if exitcode != 0:
+ sys.stdout.flush()
+ sys.stderr.flush()
+ print ("An error occurred when trying to install zc.buildout. "
+ "Look above this message for any errors that "
+ "were output by easy_install.")
+ sys.exit(exitcode)
+
+ws.add_entry(eggs_dir)
+ws.require(requirement)
+import zc.buildout.buildout
+zc.buildout.buildout.main(args)
+if not options.eggs: # clean up temporary egg directory
+ shutil.rmtree(eggs_dir)
Property changes on: cipher.configstore/trunk/bootstrap.py
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
Added: cipher.configstore/trunk/buildout.cfg
===================================================================
--- cipher.configstore/trunk/buildout.cfg (rev 0)
+++ cipher.configstore/trunk/buildout.cfg 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1,59 @@
+[buildout]
+extends = ztk-versions-1.0.1.cfg
+develop = .
+parts = test coverage coverage-test coverage2-test coverage-report python
+versions = versions
+newest = false
+include-site-packages = false
+unzip = true
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = cipher.configstore [test]
+defaults = ['--tests-pattern', '^f?tests$$', '-v']
+
+[python]
+recipe = z3c.recipe.scripts
+eggs = cipher.configstore
+interpreter = python
+
+[coverage]
+recipe = z3c.recipe.scripts
+eggs = coverage
+
+[coverage-test]
+recipe = zc.recipe.testrunner
+eggs = cipher.configstore [test]
+defaults = ['--tests-pattern', '^f?tests$$', '-v']
+initialization =
+ # haaaaack because zc.testrunner 1.4.0 produces an _insane_ bin/test
+ # that cannot be run with bin/coverage run bin/test, or even
+ # bin/python bin/test
+ import coverage, atexit
+ c = coverage.coverage(data_file='../../../.coverage')
+ def _when_done(c=c): c.stop(), c.save()
+ atexit.register(_when_done)
+ c.start()
+
+[coverage2-test]
+recipe = zc.recipe.testrunner
+eggs = cipher.configstore [test]
+defaults = ['--coverage', '${buildout:directory}/coverage']
+
+[coverage-report]
+recipe = z3c.recipe.scripts
+eggs = z3c.coverage
+scripts = coveragereport=coverage-report
+arguments = ('${buildout:directory}/coverage',
+ '${buildout:directory}/coverage/report')
+
+
+[versions]
+# we're getting buildout 1.5.0 anyway from our bootstrap
+zc.buildout = 1.5.0
+
+# required by zc.buildout 1.5.0
+zc.recipe.egg = 1.3.0
+
+# required by zc.buildout 1.5.0 for include-site-packages=false to work
+zc.recipe.testrunner = 1.4.0
Property changes on: cipher.configstore/trunk/buildout.cfg
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
Added: cipher.configstore/trunk/setup.py
===================================================================
--- cipher.configstore/trunk/setup.py (rev 0)
+++ cipher.configstore/trunk/setup.py 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1,68 @@
+##############################################################################
+#
+# Copyright (c) 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 package cipher.configstore
+"""
+import os
+from setuptools import setup, find_packages
+
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+
+setup(
+ name='cipher.configstore',
+ version='1.2.0dev0',
+ url="http://pypi.python.org/pypi/cipher.configstore/",
+ author='Zope Foundation and Contributors',
+ author_email='zope-dev at zope.org',
+ keywords="CipherHealth configuration storage configparser",
+ long_description=(
+ read('README.txt')
+ + '\n\n' +
+ read('CHANGES.txt')
+ ),
+ license='ZPL 2.1',
+ classifiers = [
+ 'Development Status :: 4 - Beta',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'Programming Language :: Python',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ 'Topic :: Internet :: WWW/HTTP',
+ 'Framework :: Zope3'],
+ packages = find_packages('src'),
+ package_dir = {'': 'src'},
+ extras_require = dict(
+ test = ['zope.testing',
+ 'z3c.coverage',
+ 'coverage',
+ 'python-subunit',
+ 'junitxml'],
+ ),
+ install_requires = [
+ 'odict',
+ 'python-dateutil',
+ 'setuptools',
+ 'zope.component',
+ 'zope.event',
+ 'zope.interface',
+ 'zope.lifecycleevent',
+ 'zope.schema',
+ 'zope.security',
+ ],
+ include_package_data = True,
+ zip_safe = False
+ )
Property changes on: cipher.configstore/trunk/setup.py
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
Property changes on: cipher.configstore/trunk/src
___________________________________________________________________
Added: svn:ignore
+ cipher.configstore.egg-info
Added: cipher.configstore/trunk/src/cipher/__init__.py
===================================================================
--- cipher.configstore/trunk/src/cipher/__init__.py (rev 0)
+++ cipher.configstore/trunk/src/cipher/__init__.py 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1,2 @@
+import pkg_resources
+pkg_resources.declare_namespace(__name__)
Property changes on: cipher.configstore/trunk/src/cipher/__init__.py
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
Added: cipher.configstore/trunk/src/cipher/configstore/__init__.py
===================================================================
--- cipher.configstore/trunk/src/cipher/configstore/__init__.py (rev 0)
+++ cipher.configstore/trunk/src/cipher/configstore/__init__.py 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1 @@
+# Make a package.
Property changes on: cipher.configstore/trunk/src/cipher/configstore/__init__.py
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
Added: cipher.configstore/trunk/src/cipher/configstore/configstore.py
===================================================================
--- cipher.configstore/trunk/src/cipher/configstore/configstore.py (rev 0)
+++ cipher.configstore/trunk/src/cipher/configstore/configstore.py 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1,364 @@
+##############################################################################
+#
+# Copyright (c) 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.
+#
+##############################################################################
+"""Configuration Store
+"""
+from __future__ import absolute_import
+
+import datetime
+import dateutil.parser
+import logging
+import odict
+import os
+import ConfigParser
+import zope.component
+import zope.event
+import zope.interface
+import zope.lifecycleevent
+import zope.schema
+from zope.security.proxy import removeSecurityProxy
+
+from cipher.configstore import interfaces
+
+log = logging.getLogger(__name__)
+
+novalue = object()
+
+def stringify(s):
+ if s is None:
+ return ''
+ return unicode(s)
+
+def parse_time(s):
+ return dateutil.parser.parse(s).time()
+
+
+class ConfigurationStore(object):
+ zope.interface.implements(interfaces.IConfigurationStore)
+ listValueSeparator = ', '
+
+ schema = None
+ fields = None
+ section = None
+
+ def __init__(self, context, schema=None, section=None):
+ if self.schema is None:
+ self.schema = schema or zope.component.adaptedBy(self.__class__)[0]
+ if self.section is None:
+ self.section = section or self.schema.getName()
+ self.context = self._getContext(context)
+
+ def _getContext(self, context):
+ return self.schema(context)
+
+ def load_type_Time(self, unicode, field):
+ return parse_time(unicode) if unicode else None
+
+ def load_type_Timedelta(self, unicode, field):
+ if not unicode:
+ return
+ h, m , s = [int(p) for p in unicode.strip().split(':')]
+ return datetime.timedelta(seconds=h*3600+m*60+s)
+
+ def load_type_Text(self, value, field):
+ return value.replace('\n<BLANKLINE>\n', '\n\n')
+
+ def load_type_Choice(self, unicode, field):
+ if not unicode.strip():
+ return None
+ bound_field = field.bind(self.context)
+ return bound_field.vocabulary.getTermByToken(unicode).value
+
+ def load_type_List(self, unicode, field):
+ if not unicode.strip():
+ return []
+ return [item.strip() for item in unicode.split(self.listValueSeparator)]
+
+ def load_type_Tuple(self, unicode, field):
+ return tuple(self.load_type_List(unicode, field))
+
+ def _load_field(self, name, field, config, context=None):
+ if context is None:
+ context = self.context
+ if field.readonly:
+ # skip read-only fields, especially __name__
+ return False
+ field_type = field.__class__
+ if hasattr(self, 'load_'+name):
+ converter = getattr(self, 'load_'+name, None)
+ elif hasattr(self, 'load_type_'+field_type.__name__):
+ converter = getattr(self, 'load_type_'+field_type.__name__, None)
+ converter = lambda v, converter=converter: converter(v, field)
+ elif zope.schema.interfaces.IFromUnicode.providedBy(field):
+ converter = field.bind(context).fromUnicode
+ else:
+ # If we do not have a converter then it is probably meant to be.
+ return False
+ try:
+ value = converter(
+ unicode(config.get(self.section, name), 'UTF-8'))
+ except (ConfigParser.NoSectionError, ConfigParser.NoOptionError,
+ zope.schema.ValidationError, ValueError):
+ # Ignore fields that fail validation, since the field might
+ # simply not be set and no value is an invalid value.
+ return False
+ if value != getattr(context, name):
+ try:
+ setattr(context, name, value)
+ except zope.schema.ValidationError, e:
+ log.warn("Field %r %s failed validation: %s", context, name, e)
+ # Ignore fields that fail validation, since the field might
+ # simply not be set and no value is an invalid value.
+ return False
+ return True
+ return False
+
+ def _load(self, config):
+ changed_fields = []
+ for name, field in zope.schema.getFieldsInOrder(self.schema):
+ __traceback_info__ = name
+ if self.fields is None or name in self.fields:
+ changed = self._load_field(name, field, config)
+ if changed:
+ changed_fields.append(name)
+ return changed_fields
+
+ def load(self, config):
+ changed_fields = self._load(config)
+ stores = zope.component.subscribers(
+ (self.context,), interfaces.IConfigurationStore)
+ for store in stores:
+ if not isinstance(store, self.__class__):
+ store.load(config)
+ zope.event.notify(
+ interfaces.ObjectConfigurationLoadedEvent(
+ self.context,
+ zope.lifecycleevent.Attributes(self.schema, *changed_fields)
+ ))
+
+ def dump_type_Time(self, value, field):
+ return value.strftime('%H:%M') if value is not None else ''
+
+ def dump_type_Timedelta(self, value, field):
+ return str(value) if value is not None else ''
+
+ def dump_type_Text(self, value, field):
+ if not value:
+ return ''
+ value = value.replace('\r\n', '\n')
+ return value.replace('\n\n', '\n<BLANKLINE>\n')
+
+ def dump_type_Choice(self, value, field):
+ if value is None or value == '':
+ return ''
+ bound_field = field.bind(self.context)
+ return bound_field.vocabulary.getTerm(value).token
+
+ def dump_type_Tuple(self, value, field):
+ return self.listValueSeparator.join(value) if value else ''
+
+ dump_type_List = dump_type_Tuple
+
+ def _dump_field(self, name, field, config, value=novalue):
+ __traceback_info__ = (name, field)
+ if field.readonly:
+ # skip read-only fields, we won't be loading them
+ return
+ field_type = field.__class__
+ if hasattr(self, 'dump_'+name):
+ converter = getattr(self, 'dump_'+name)
+ elif hasattr(self, 'dump_type_'+field_type.__name__):
+ converter = getattr(self, 'dump_type_'+field_type.__name__)
+ converter = lambda v, converter=converter: converter(v, field)
+ elif zope.schema.interfaces.IFromUnicode.providedBy(field):
+ converter = stringify
+ else:
+ # It is not meant to be.
+ return
+ if value is novalue:
+ value = getattr(self.context, name)
+ unicode_value = converter(value)
+ assert unicode_value is not None, "%r wasn't supposed to return None!" % converter
+ config.set(self.section, name, unicode_value.encode('UTF-8'))
+
+ def _dump(self, config):
+ """Hook for custom config stores."""
+ config.add_section(self.section)
+ for name, field in zope.schema.getFieldsInOrder(self.schema):
+ if self.fields is None or name in self.fields:
+ self._dump_field(name, field, config)
+
+ def dump(self, config=None):
+ if config is None:
+ config = ConfigParser.RawConfigParser(dict_type=odict.odict)
+ config.optionxform = str # don't lowercase
+ # Write object's configuration.
+ self._dump(config)
+ # Write any sub-object configuration.
+ stores = zope.component.subscribers(
+ (self.context,), interfaces.IConfigurationStore)
+ for store in stores:
+ __traceback_info__ = repr(store)
+ store.dump(config)
+ return config
+
+class CollectionConfigurationStore(ConfigurationStore):
+ section_prefix = None
+ item_factory = None
+
+ def _getContext(self, context):
+ return self.schema(context)
+
+ def _getItems(self):
+ return self.context.items()
+
+ def _getItemFactory(self, config, section):
+ return self.item_factory
+
+ def _add(self, name, item):
+ self.context[name] = item
+ # In case we are not dealing with a traditional container, let's set
+ # the parent and name.
+ # Note: I have honestly no idea why I originally even put this in.
+ if hasattr(item, '__parent__') and item.__parent__ is None:
+ item.__parent__ = removeSecurityProxy(self.context)
+ if hasattr(item, '__name__') and item.__name__ is None:
+ item.__name__ = name
+
+ def _applyPostAddConfig(self, item, config, section):
+ pass
+
+ def load(self, config):
+ # Remove all existing items
+ removeSecurityProxy(self.context).__init__()
+ # Load one item at a time.
+ for section in config.sections():
+ if not section.startswith(self.section_prefix):
+ continue
+ name = section[len(self.section_prefix):].decode('UTF-8')
+ itemFactory = self._getItemFactory(config, section)
+ __traceback_info__ = (section, itemFactory)
+ item = itemFactory()
+ item_store = interfaces.IConfigurationStore(item)
+ item_store.section = section
+ item_store.load(config)
+ # Note sends a ContainerModifiedEvent which would causes a config
+ # dump, overwriting the original file with partial information.
+ # That's why we have this _v_load_in_progress "lock".
+ self._add(name, item)
+ self._applyPostAddConfig(item, config, section)
+ zope.event.notify(
+ interfaces.ObjectConfigurationLoadedEvent(self.context))
+
+ def dump(self, config=None):
+ if config is None:
+ config = ConfigParser.RawConfigParser(dict_type=odict.odict)
+ config.optionxform = str # don't lowercase
+ for name, item in self._getItems():
+ if getattr(item, '__parent__', self) is None:
+ # Sad story: you remove an item from a BTreeContainer
+ # it emits ContainerModifiedEvent before deleting that item
+ # (but after setting the item's __parent__ to None)
+ # so if you've a subscriber for ObjectModifiedEvent that
+ # dumps configuration after changes, you need to explicitly
+ # filter out items that are about to be deleted.
+ # See https://bugs.launchpad.net/bugs/705600
+ continue
+ item_store = interfaces.IConfigurationStore(item)
+ item_store.section = self.section_prefix + name.encode('UTF-8')
+ __traceback_info__ = item_store.section
+ item_store.dump(config)
+ return config
+
+def createConfigurationStore(schema, section=None):
+ return type(
+ schema.getName()[1:]+'Store', (ConfigurationStore,),
+ {'section': section, 'schema': schema})
+
+
+class ExternalConfigurationStore(ConfigurationStore):
+
+ def get_config_dir(self):
+ return None
+
+ def get_site(self):
+ return None
+
+ def get_filename(self):
+ return self.context.__name__+'.ini'
+
+ def _load_from_external(self, config):
+ # Load general attributes.
+ orig_section = self.section
+ self.section = 'general'
+ changed_fields = self._load(config)
+ self.section = orig_section
+ # Load other components.
+ stores = zope.component.subscribers(
+ (self.context,), interfaces.IConfigurationStore)
+ for store in stores:
+ if not isinstance(store, self.__class__):
+ store.load(config)
+ zope.event.notify(
+ interfaces.ObjectConfigurationLoadedEvent(
+ self.context,
+ zope.lifecycleevent.Attributes(self.schema, *changed_fields)
+ ))
+
+ def load(self, config):
+ fn = os.path.join(
+ self.get_config_dir(), config.get(self.section, 'config-path'))
+ __traceback_info__ = fn
+ ext_config = ConfigParser.RawConfigParser(dict_type=odict.odict)
+ ext_config.optionxform = str # don't lowercase
+ ext_config.read(fn)
+ self._load_from_external(ext_config)
+
+ def _dump_to_external(self):
+ # Compute the filename.
+ cs = self.get_site()
+ fn = os.path.join(
+ self.get_config_dir(), cs.__name__, self.get_filename())
+ # Create a new configuration for the table-specific API.
+ config = ConfigParser.RawConfigParser(dict_type=odict.odict)
+ config.optionxform = str # don't lowercase
+ # Write object's configuration.
+ orig_section = self.section
+ self.section = 'general'
+ __traceback_info__ = fn
+ self._dump(config)
+ self.section = orig_section
+ # Write any sub-object configuration.
+ stores = zope.component.subscribers(
+ (self.context,), interfaces.IConfigurationStore)
+ for store in stores:
+ __traceback_info__ = (fn, store)
+ store.dump(config)
+ # Write the configuration out.
+ with open(fn, 'w') as file:
+ config.write(file)
+ return fn
+
+ def dump(self, config=None):
+ if config is None:
+ config = ConfigParser.RawConfigParser(dict_type=odict.odict)
+ config.optionxform = str # don't lowercase
+ # Write any sub-object configuration into a separate configuration file.
+ fn = self._dump_to_external()
+ # Just a small stub in the main config.
+ config.add_section(self.section)
+ config.set(
+ self.section, 'config-path',
+ os.path.relpath(fn, self.get_config_dir()))
+ # Write a minimal configuration.
+ return config
Property changes on: cipher.configstore/trunk/src/cipher/configstore/configstore.py
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
Added: cipher.configstore/trunk/src/cipher/configstore/configstore.txt
===================================================================
--- cipher.configstore/trunk/src/cipher/configstore/configstore.txt (rev 0)
+++ cipher.configstore/trunk/src/cipher/configstore/configstore.txt 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1,272 @@
+===================
+Configuration Store
+===================
+
+The configuration store allows you to store an object's data in a
+configuration file. Let's create a simple component:
+
+ >>> import zope.interface
+ >>> import zope.schema
+
+ >>> class IPerson(zope.interface.Interface):
+ ... firstName = zope.schema.TextLine(title=u'First Name')
+ ... lastName = zope.schema.TextLine(title=u'Last Name')
+ ... nickname = zope.schema.TextLine(title=u'Nickname')
+
+ >>> class Person(object):
+ ... zope.interface.implements(IPerson)
+ ... def __init__(self, fn, ln):
+ ... self.firstName = fn
+ ... self.lastName = ln
+ ... self.nickname = None
+ >>> stephan = Person(u'Stephan', u'Richter')
+
+We always have to create a configuration store specific to an object:
+
+ >>> from cipher.configstore import configstore
+ >>> PersonStore = configstore.createConfigurationStore(IPerson, 'generic')
+ >>> PersonStore
+ <class 'cipher.configstore.configstore.PersonStore'>
+ >>> store = PersonStore(stephan)
+
+We can now dump the configuration to a file:
+
+ >>> config = store.dump()
+ >>> config
+ <ConfigParser.RawConfigParser instance at ...>
+
+ >>> import tempfile
+ >>> conf_fn = tempfile.mktemp('.ini', prefix='cipher-configstore-')
+ >>> config.write(open(conf_fn, 'w'))
+ >>> print open(conf_fn, 'r').read()
+ [generic]
+ firstName = Stephan
+ lastName = Richter
+ nickname =
+
+We can now load the config again, overwriting any existing data.
+
+ >>> stephan2 = Person(u'', u'')
+ >>> store = PersonStore(stephan2)
+
+ >>> import ConfigParser
+ >>> config = ConfigParser.RawConfigParser()
+ >>> config.readfp(open(conf_fn, 'r'))
+
+ >>> store.load(config)
+ >>> stephan2.firstName
+ u'Stephan'
+ >>> stephan2.lastName
+ u'Richter'
+ >>> stephan2.nickname
+ u''
+
+Note that after the loading process an ``ObjectModifiedEvent`` event is
+created. Let's write a simple subscriber to the event and see what we get:
+
+ >>> from cipher.configstore import interfaces
+ >>> def handleModified(event):
+ ... assert interfaces.IObjectConfigurationLoadedEvent.providedBy(event)
+ ... print 'Object modified: %r' %event.object
+ ... print '\n'.join([
+ ... a.interface.getName()+': ' + ', '.join(a.attributes)
+ ... for a in event.descriptions])
+ >>> import zope.event
+ >>> zope.event.subscribers.append(handleModified)
+
+ >>> stephan2.firstName = u'Anton'
+ >>> store.load(config)
+ Object modified: <Person object at ...>
+ IPerson: firstName
+
+ >>> zope.event.subscribers.remove(handleModified)
+
+
+Sub-Component Storage
+---------------------
+
+To allow for an extensible storage meachnism, one can register additional
+stores for a given object. Let's say we would like to store an address:
+
+ >>> class IAddress(zope.interface.Interface):
+ ... zip = zope.schema.TextLine(title=u'ZIP Code')
+
+ >>> class Address(object):
+ ... zope.interface.implements(IAddress)
+ ... def __init__(self, zip):
+ ... self.zip = zip
+ ... def __repr__(self):
+ ... return '<%s %s>' %(self.__class__.__name__, self.zip)
+ >>> home = Address(u'01754')
+
+For the default store to work, the address must be available as an adapter to
+the person:
+
+ >>> zope.component.provideAdapter(lambda p: home, (IPerson,), IAddress)
+ >>> IAddress(stephan)
+ <Address 01754>
+
+We can now create an register a store for the address:
+
+ >>> AddressStore = configstore.createConfigurationStore(IAddress, 'address')
+ >>> zope.component.provideSubscriptionAdapter(AddressStore, (IPerson,))
+
+Let's now regenerate the configuration for the person:
+
+ >>> config = store.dump()
+ >>> config.write(open(conf_fn, 'w'))
+ >>> print open(conf_fn, 'r').read()
+ [generic]
+ firstName = Stephan
+ lastName = Richter
+ nickname =
+ <BLANKLINE>
+ [address]
+ zip = 01754
+
+Let's now load the configuration again:
+
+ >>> home.zip = u'10000'
+
+ >>> config = ConfigParser.RawConfigParser()
+ >>> config.readfp(open(conf_fn, 'r'))
+ >>> store.load(config)
+
+ >>> home.zip
+ u'01754'
+
+Custom Value Serialization
+--------------------------
+
+In order to provide custom value serialization, one has to sub-class the
+`ConfigurationStore` class. Here is an example of capitalizing the last name
+of the person:
+
+ >>> import zope.component
+ >>> class PersonStore(configstore.ConfigurationStore):
+ ... zope.component.adapts(IPerson)
+ ... def load_lastName(self, value):
+ ... return unicode(value.title())
+ ... def dump_lastName(self, value):
+ ... return value.encode('UTF-8').upper()
+ >>> store = PersonStore(stephan)
+
+Let's now serialize the configuration again:
+
+ >>> config = store.dump()
+ >>> config.write(open(conf_fn, 'w'))
+ >>> print open(conf_fn, 'r').read()
+ [IPerson]
+ firstName = Stephan
+ lastName = RICHTER
+ nickname =
+ <BLANKLINE>
+ [address]
+ zip = 01754
+
+Also note that since I did not specify a section name, the name of the schema
+is picked up. Let's now load the config and make sure it is stored correctly:
+
+ >>> config = ConfigParser.RawConfigParser()
+ >>> config.readfp(open(conf_fn, 'r'))
+ >>> store.load(config)
+ >>> stephan.lastName
+ u'Richter'
+
+Collection Stores
+-----------------
+
+Collections of arbitrary objects are not as easy to represent in a flat
+ini-style format. The common solution is to use a section prefix and create a
+section for each item in the collection with a unique section name. The
+``configstore`` module provides a helper class to implement collection stores.
+
+Let's say a person has a collection of phone numbers:
+
+ >>> class IPhoneNumber(zope.interface.Interface):
+ ... name = zope.schema.TextLine(title=u'Name')
+ ... number = zope.schema.TextLine(title=u'ZIP Code')
+
+ >>> class PhoneNumber(object):
+ ... zope.interface.implements(IPhoneNumber)
+ ... def __init__(self, name=None, number=None):
+ ... self.name = name
+ ... self.number = number
+ ... def __repr__(self):
+ ... return '<%s %s>' %(self.__class__.__name__, self.name)
+
+ >>> class IPhoneNumbers(zope.schema.interfaces.IContainer):
+ ... pass
+
+ >>> class PhoneNumbers(dict):
+ ... zope.interface.implements(IPhoneNumbers)
+ ... def __repr__(self):
+ ... return '<%s %i>' %(self.__class__.__name__, len(self))
+
+ >>> numbers = PhoneNumbers()
+ >>> numbers['home'] = PhoneNumber(u'home', u'555-111-2222')
+ >>> numbers['work'] = PhoneNumber(u'work', u'555-333-4444')
+
+ >>> zope.component.provideAdapter(
+ ... lambda p: numbers, (IPerson,), IPhoneNumbers)
+ >>> IPhoneNumbers(stephan)
+ <PhoneNumbers 2>
+
+Let's now create a config store for the individual phone number. Note that it
+is *not* a subscription adapter in this case.
+
+ >>> PhoneNumberStore = configstore.createConfigurationStore(IPhoneNumber)
+ >>> zope.component.provideAdapter(PhoneNumberStore, (IPhoneNumber,))
+
+For the collection of phone numbers, we simply use the collection config store
+base class:
+
+ >>> class PhoneNumbersStore(configstore.CollectionConfigurationStore):
+ ... schema = IPhoneNumbers
+ ... section_prefix = 'number:'
+ ... item_factory = PhoneNumber
+ >>> zope.component.provideSubscriptionAdapter(
+ ... PhoneNumbersStore, (IPerson,))
+
+Let's now dump the configuration:
+
+ >>> config = store.dump()
+ >>> config.write(open(conf_fn, 'w'))
+ >>> print open(conf_fn, 'r').read()
+ [IPerson]
+ firstName = Stephan
+ lastName = RICHTER
+ nickname =
+ <BLANKLINE>
+ [address]
+ zip = 01754
+ <BLANKLINE>
+ [number:home]
+ name = home
+ number = 555-111-2222
+ <BLANKLINE>
+ [number:work]
+ name = work
+ number = 555-333-4444
+
+Let's now load the config and make sure it is stored correctly:
+
+ >>> config = ConfigParser.RawConfigParser()
+ >>> config.readfp(open(conf_fn, 'r'))
+ >>> store.load(config)
+ >>> numbers
+ <PhoneNumbers 2>
+ >>> numbers['home'].name
+ u'home'
+ >>> numbers['home'].number
+ u'555-111-2222'
+ >>> numbers['work'].name
+ u'work'
+ >>> numbers['work'].number
+ u'555-333-4444'
+
+Cleanup:
+
+ >>> import os
+ >>> os.unlink(conf_fn)
+
Property changes on: cipher.configstore/trunk/src/cipher/configstore/configstore.txt
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
Added: cipher.configstore/trunk/src/cipher/configstore/interfaces.py
===================================================================
--- cipher.configstore/trunk/src/cipher/configstore/interfaces.py (rev 0)
+++ cipher.configstore/trunk/src/cipher/configstore/interfaces.py 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1,87 @@
+##############################################################################
+#
+# Copyright (c) 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.
+#
+##############################################################################
+"""Interfaces"""
+
+import zope.interface
+import zope.schema
+from zope.lifecycleevent import ObjectModifiedEvent
+from zope.lifecycleevent.interfaces import IObjectModifiedEvent
+
+
+class ConfigurationLoadError(Exception):
+ pass
+
+
+class IConfigurationStore(zope.interface.Interface):
+ """ConfigParser-based configuration store.
+
+ The interface is meant to be used as an adapter of a given object.
+ """
+
+ schema = zope.interface.Attribute('The schema to be serialized.')
+
+ section = zope.schema.ASCIILine(
+ title = u'Section Name',
+ description = u'The name of the section in the configuration.',
+ required=True)
+
+ def load(config):
+ """Load configuration and apply it to the object."""
+
+ def dump(config=None):
+ """Dump the object's state into the configuration.
+
+ If the `config` paramter is `None`, a configuration object is created.
+ """
+
+class ICipherObject(zope.interface.Interface):
+ "mark all Cipher objects"
+
+
+class ICipherConfigurationComponent(zope.interface.Interface):
+ """A component serving as configuration for the Cipher application."""
+
+
+class ICipherConfiguration(ICipherConfigurationComponent):
+ """A sub-object that contains configuration for ICipherSite."""
+
+ __parent__ = zope.interface.Attribute("ICipherSite")
+
+ title = zope.interface.Attribute(u'The name of the configuration.')
+
+ lastVerificationResult = zope.interface.Attribute(
+ u"""The result object of the last verification.
+
+ The attribute can be set to None signaling that no meaningful result
+ is available. This can either be the case either after initialization
+ or whenever some state of the configuration was changed.
+ """)
+
+ def verify():
+ """Verify the configuration and return a verification result.
+
+ A verification result is a map of metric checked and a tuple of status
+ code and reason. HTTP status code conventions are used. For example::
+
+ {'test1': (200, 'Ok'),
+ 'test2': (400, 'Failed to find somehting.')}
+ """
+
+
+class IObjectConfigurationLoadedEvent(IObjectModifiedEvent):
+ """We've just loaded an object's configuration from disk."""
+
+
+class ObjectConfigurationLoadedEvent(ObjectModifiedEvent):
+ zope.interface.implements(IObjectConfigurationLoadedEvent)
Property changes on: cipher.configstore/trunk/src/cipher/configstore/interfaces.py
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
Added: cipher.configstore/trunk/src/cipher/configstore/tests.py
===================================================================
--- cipher.configstore/trunk/src/cipher/configstore/tests.py (rev 0)
+++ cipher.configstore/trunk/src/cipher/configstore/tests.py 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1,15 @@
+"""Tests"""
+import doctest
+import unittest
+
+
+def test_suite():
+ return unittest.TestSuite((
+ doctest.DocFileSuite(
+ "configstore.txt",
+ optionflags=doctest.NORMALIZE_WHITESPACE|
+ doctest.ELLIPSIS|
+ doctest.REPORT_ONLY_FIRST_FAILURE
+ #|doctest.REPORT_NDIFF
+ ),
+ ))
Property changes on: cipher.configstore/trunk/src/cipher/configstore/tests.py
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
Added: cipher.configstore/trunk/ztk-versions-1.0.1.cfg
===================================================================
--- cipher.configstore/trunk/ztk-versions-1.0.1.cfg (rev 0)
+++ cipher.configstore/trunk/ztk-versions-1.0.1.cfg 2012-04-06 09:30:07 UTC (rev 125000)
@@ -0,0 +1,110 @@
+[versions]
+# ZTK
+zope.annotation = 3.5.0
+zope.applicationcontrol = 3.5.5
+zope.authentication = 3.7.1
+zope.broken = 3.6.0
+zope.browser = 1.3
+zope.browsermenu = 3.9.1
+zope.browserpage = 3.12.2
+zope.browserresource = 3.10.3
+zope.cachedescriptors = 3.5.1
+zope.catalog = 3.8.1
+zope.component = 3.9.5
+zope.componentvocabulary = 1.0.1
+zope.configuration = 3.7.2
+zope.container = 3.11.2
+zope.contentprovider = 3.7.2
+zope.contenttype = 3.5.1
+zope.copy = 3.5.0
+zope.copypastemove = 3.6.0
+zope.datetime = 3.4.0
+zope.deferredimport = 3.5.3
+zope.deprecation = 3.4.0
+zope.dottedname = 3.4.6
+zope.dublincore = 3.7.0
+zope.error = 3.7.2
+zope.event = 3.5.0-1
+zope.exceptions = 3.6.1
+zope.filerepresentation = 3.6.0
+zope.formlib = 4.0.5
+zope.hookable = 3.4.1
+zope.i18n = 3.7.4
+zope.i18nmessageid = 3.5.3
+zope.index = 3.6.1
+zope.interface = 3.6.1
+zope.intid = 3.7.2
+zope.keyreference = 3.6.2
+zope.lifecycleevent = 3.6.2
+zope.location = 3.9.0
+zope.login = 1.0.0
+zope.mimetype = 1.3.1
+zope.minmax = 1.1.2
+zope.pagetemplate = 3.5.2
+zope.password = 3.6.1
+zope.pluggableauth = 1.0.3
+zope.principalannotation = 3.6.1
+zope.principalregistry = 3.7.1
+zope.processlifetime = 1.0
+zope.proxy = 3.6.1
+zope.ptresource = 3.9.0
+zope.publisher = 3.12.4
+zope.ramcache = 1.0
+zope.schema = 3.7.0
+zope.security = 3.7.4
+zope.securitypolicy = 3.7.0
+zope.sendmail = 3.7.4
+zope.sequencesort = 3.4.0
+zope.server = 3.6.2
+zope.session = 3.9.3
+zope.site = 3.9.2
+zope.size = 3.4.1
+zope.structuredtext = 3.5.0
+zope.tal = 3.5.2
+zope.tales = 3.5.1
+zope.testing = 3.9.5
+zope.traversing = 3.13
+zope.viewlet = 3.7.2
+
+# Deprecating
+zope.documenttemplate = 3.4.2
+
+# Dependencies
+# Needed for the mechanize 0.1.x.
+ClientForm = 0.2.10
+distribute = 0.6.14
+docutils = 0.7
+Jinja2 = 2.5.5
+# Newer versions of mechanize are not fully py24 compatible.
+mechanize = 0.1.11
+Paste = 1.7.5.1
+PasteDeploy = 1.3.4
+PasteScript = 1.7.3
+py = 1.3.4
+Pygments = 1.3.1
+python-gettext = 1.0
+pytz = 2010l
+RestrictedPython = 3.6.0
+setuptools = 0.6c11
+Sphinx = 1.0.5
+transaction = 1.1.1
+z3c.recipe.sphinxdoc = 0.0.8
+zc.buildout = 1.4.4
+zc.lockfile = 1.0.0
+ZConfig = 2.8.0
+zc.recipe.egg = 1.2.2
+zc.recipe.testrunner = 1.2.1
+zc.resourcelibrary = 1.3.1
+zdaemon = 2.0.4
+ZODB3 = 3.9.7
+zope.mkzeoinstance = 3.9.4
+
+# toolchain
+argparse = 1.1
+lxml = 2.2.8
+mr.developer = 1.16
+tl.eggdeps = 0.4
+z3c.checkversions = 0.4.1
+z3c.recipe.compattest = 0.12.2
+z3c.recipe.depgraph = 0.5
+zope.kgs = 1.2.0
Property changes on: cipher.configstore/trunk/ztk-versions-1.0.1.cfg
___________________________________________________________________
Added: svn:keywords
+ Date Author Id Revision
Added: svn:eol-style
+ native
More information about the checkins
mailing list