zope.app.schema-3.5.0/ 0000755 0001750 0001750 00000000000 11121665563 012714 5 ustar nyo nyo zope.app.schema-3.5.0/setup.cfg 0000644 0001750 0001750 00000000073 11121665563 014535 0 ustar nyo nyo [egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0
zope.app.schema-3.5.0/PKG-INFO 0000644 0001750 0001750 00000004711 11121665563 014014 0 ustar nyo nyo Metadata-Version: 1.0
Name: zope.app.schema
Version: 3.5.0
Summary: Component Architecture based Vocabulary Registry
Home-page: http://pypi.python.org/pypi/zope.app.schema
Author: Zope Corporation and Contributors
Author-email: zope-dev@zope.org
License: ZPL 2.1
Description: This package provides a component architecture based vocabulary registry.
Component-based Vocabulary Registry
===================================
This package provides a vocabulary registry for zope.schema,
based on the component architecture.
It replaces the zope.schema's simple vocabulary registry
when ``zope.app.schema`` package is imported, so it's done
automatically. All we need is provide vocabulary factory
utilities:
>>> from zope.component import provideUtility
>>> from zope.schema.interfaces import IVocabularyFactory
>>> from zope.schema.vocabulary import SimpleTerm
>>> from zope.schema.vocabulary import SimpleVocabulary
>>> def SomeVocabulary(context=None):
... terms = [SimpleTerm(1), SimpleTerm(2)]
... return SimpleVocabulary(terms)
>>> provideUtility(SomeVocabulary, IVocabularyFactory,
... name='SomeVocabulary')
Now we can get the vocabulary using standard zope.schema
way:
>>> from zope.schema.vocabulary import getVocabularyRegistry
>>> vr = getVocabularyRegistry()
>>> voc = vr.get(None, 'SomeVocabulary')
>>> [term.value for term in voc]
[1, 2]
=======
CHANGES
=======
3.5.0 (2008-12-16)
------------------
- Remove deprecated ``vocabulary`` directive.
- Add test for component-based vocabulary registry.
3.4.0 (2007-10-27)
------------------
- Initial release independent of the main Zope tree.
Keywords: zope3 vocabulary registry local component
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.schema-3.5.0/src/ 0000755 0001750 0001750 00000000000 11121665563 013503 5 ustar nyo nyo zope.app.schema-3.5.0/src/zope.app.schema.egg-info/ 0000755 0001750 0001750 00000000000 11121665563 020170 5 ustar nyo nyo zope.app.schema-3.5.0/src/zope.app.schema.egg-info/PKG-INFO 0000644 0001750 0001750 00000004711 11121665561 021266 0 ustar nyo nyo Metadata-Version: 1.0
Name: zope.app.schema
Version: 3.5.0
Summary: Component Architecture based Vocabulary Registry
Home-page: http://pypi.python.org/pypi/zope.app.schema
Author: Zope Corporation and Contributors
Author-email: zope-dev@zope.org
License: ZPL 2.1
Description: This package provides a component architecture based vocabulary registry.
Component-based Vocabulary Registry
===================================
This package provides a vocabulary registry for zope.schema,
based on the component architecture.
It replaces the zope.schema's simple vocabulary registry
when ``zope.app.schema`` package is imported, so it's done
automatically. All we need is provide vocabulary factory
utilities:
>>> from zope.component import provideUtility
>>> from zope.schema.interfaces import IVocabularyFactory
>>> from zope.schema.vocabulary import SimpleTerm
>>> from zope.schema.vocabulary import SimpleVocabulary
>>> def SomeVocabulary(context=None):
... terms = [SimpleTerm(1), SimpleTerm(2)]
... return SimpleVocabulary(terms)
>>> provideUtility(SomeVocabulary, IVocabularyFactory,
... name='SomeVocabulary')
Now we can get the vocabulary using standard zope.schema
way:
>>> from zope.schema.vocabulary import getVocabularyRegistry
>>> vr = getVocabularyRegistry()
>>> voc = vr.get(None, 'SomeVocabulary')
>>> [term.value for term in voc]
[1, 2]
=======
CHANGES
=======
3.5.0 (2008-12-16)
------------------
- Remove deprecated ``vocabulary`` directive.
- Add test for component-based vocabulary registry.
3.4.0 (2007-10-27)
------------------
- Initial release independent of the main Zope tree.
Keywords: zope3 vocabulary registry local component
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.schema-3.5.0/src/zope.app.schema.egg-info/namespace_packages.txt 0000644 0001750 0001750 00000000016 11121665561 024516 0 ustar nyo nyo zope
zope.app
zope.app.schema-3.5.0/src/zope.app.schema.egg-info/SOURCES.txt 0000644 0001750 0001750 00000001215 11121665561 022051 0 ustar nyo nyo CHANGES.txt
README.txt
bootstrap.py
buildout.cfg
setup.py
src/zope/__init__.py
src/zope.app.schema.egg-info/PKG-INFO
src/zope.app.schema.egg-info/SOURCES.txt
src/zope.app.schema.egg-info/dependency_links.txt
src/zope.app.schema.egg-info/namespace_packages.txt
src/zope.app.schema.egg-info/not-zip-safe
src/zope.app.schema.egg-info/requires.txt
src/zope.app.schema.egg-info/top_level.txt
src/zope/app/__init__.py
src/zope/app/schema/README.txt
src/zope/app/schema/SETUP.cfg
src/zope/app/schema/__init__.py
src/zope/app/schema/configure.zcml
src/zope/app/schema/tests.py
src/zope/app/schema/vocabulary.py
src/zope/app/schema/zope.app.schema-configure.zcml zope.app.schema-3.5.0/src/zope.app.schema.egg-info/not-zip-safe 0000644 0001750 0001750 00000000001 11121664413 022407 0 ustar nyo nyo
zope.app.schema-3.5.0/src/zope.app.schema.egg-info/top_level.txt 0000644 0001750 0001750 00000000005 11121665561 022713 0 ustar nyo nyo zope
zope.app.schema-3.5.0/src/zope.app.schema.egg-info/requires.txt 0000644 0001750 0001750 00000000115 11121665561 022563 0 ustar nyo nyo setuptools
zope.component
zope.interface
zope.schema
[test]
zope.app.testing zope.app.schema-3.5.0/src/zope.app.schema.egg-info/dependency_links.txt 0000644 0001750 0001750 00000000001 11121665561 024234 0 ustar nyo nyo
zope.app.schema-3.5.0/src/zope/ 0000755 0001750 0001750 00000000000 11121665563 014460 5 ustar nyo nyo zope.app.schema-3.5.0/src/zope/app/ 0000755 0001750 0001750 00000000000 11121665563 015240 5 ustar nyo nyo zope.app.schema-3.5.0/src/zope/app/schema/ 0000755 0001750 0001750 00000000000 11121665563 016500 5 ustar nyo nyo zope.app.schema-3.5.0/src/zope/app/schema/zope.app.schema-configure.zcml 0000644 0001750 0001750 00000000046 11121664333 024333 0 ustar nyo nyo
zope.app.schema-3.5.0/src/zope/app/schema/configure.zcml 0000644 0001750 0001750 00000016441 11121664333 021350 0 ustar nyo nyo
zope.app.schema-3.5.0/src/zope/app/schema/tests.py 0000644 0001750 0001750 00000000763 11121664333 020214 0 ustar nyo nyo import unittest
from zope.testing import doctest
from zope.app.testing import setup
from zope.app.schema.vocabulary import _clear
def setUp(test):
setup.placefulSetUp()
_clear()
def tearDown(test):
setup.placefulTearDown()
def test_suite():
return unittest.TestSuite((
doctest.DocFileSuite('README.txt',
setUp=setUp, tearDown=tearDown,
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
),
))
zope.app.schema-3.5.0/src/zope/app/schema/SETUP.cfg 0000644 0001750 0001750 00000000176 11121664333 020057 0 ustar nyo nyo # Tell zpkg how to install the ZCML slugs.
zope.app.schema-*.zcml
zope.app.schema-3.5.0/src/zope/app/schema/vocabulary.py 0000644 0001750 0001750 00000003450 11121664333 021215 0 ustar nyo nyo ##############################################################################
#
# Copyright (c) 2003 Zope Corporation 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.
#
##############################################################################
"""Implementation of ZCML action to register vocabulary factories.
$Id: vocabulary.py 73667 2007-03-27 07:25:21Z dobe $
"""
import zope.component
from zope.interface import implements
from zope.schema.interfaces import IVocabularyRegistry
from zope.schema import vocabulary
from zope.schema.interfaces import IVocabularyFactory
class ZopeVocabularyRegistry(object):
"""IVocabularyRegistry that supports global and local utilities."""
implements(IVocabularyRegistry)
__slots__ = ()
def get(self, context, name):
"""See zope.schema.interfaces.IVocabularyRegistry"""
factory = zope.component.getUtility(IVocabularyFactory, name)
return factory(context)
def _clear():
"""Re-initialize the vocabulary registry."""
# This should normally only be needed by the testing framework,
# but is also used for module initialization.
global vocabularyRegistry
vocabulary._clear()
vocabularyRegistry = vocabulary.getVocabularyRegistry()
vocabulary._clear()
vocabulary.setVocabularyRegistry(ZopeVocabularyRegistry())
_clear()
try:
from zope.testing import cleanup
except ImportError:
pass
else:
cleanup.addCleanUp(_clear)
zope.app.schema-3.5.0/src/zope/app/schema/README.txt 0000644 0001750 0001750 00000002042 11121664333 020166 0 ustar nyo nyo Component-based Vocabulary Registry
===================================
This package provides a vocabulary registry for zope.schema,
based on the component architecture.
It replaces the zope.schema's simple vocabulary registry
when ``zope.app.schema`` package is imported, so it's done
automatically. All we need is provide vocabulary factory
utilities:
>>> from zope.component import provideUtility
>>> from zope.schema.interfaces import IVocabularyFactory
>>> from zope.schema.vocabulary import SimpleTerm
>>> from zope.schema.vocabulary import SimpleVocabulary
>>> def SomeVocabulary(context=None):
... terms = [SimpleTerm(1), SimpleTerm(2)]
... return SimpleVocabulary(terms)
>>> provideUtility(SomeVocabulary, IVocabularyFactory,
... name='SomeVocabulary')
Now we can get the vocabulary using standard zope.schema
way:
>>> from zope.schema.vocabulary import getVocabularyRegistry
>>> vr = getVocabularyRegistry()
>>> voc = vr.get(None, 'SomeVocabulary')
>>> [term.value for term in voc]
[1, 2] zope.app.schema-3.5.0/src/zope/app/schema/__init__.py 0000644 0001750 0001750 00000001502 11121664333 020601 0 ustar nyo nyo ##############################################################################
#
# Copyright (c) 2006 Zope Corporation 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.
#
##############################################################################
"""Schemas
$Id: __init__.py 66068 2006-03-19 16:27:42Z philikon $
"""
# we want to hook-up our own vocabulary registry; importing the module
# is enough for that
import zope.app.schema.vocabulary
zope.app.schema-3.5.0/src/zope/app/__init__.py 0000644 0001750 0001750 00000000310 11121664333 017335 0 ustar nyo nyo # 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.schema-3.5.0/src/zope/__init__.py 0000644 0001750 0001750 00000000310 11121664333 016555 0 ustar nyo nyo # 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.schema-3.5.0/bootstrap.py 0000644 0001750 0001750 00000003370 11121664333 015300 0 ustar nyo nyo ##############################################################################
#
# Copyright (c) 2006 Zope Corporation 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.
$Id: bootstrap.py 73666 2007-03-27 07:20:45Z dobe $
"""
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.schema-3.5.0/setup.py 0000644 0001750 0001750 00000004375 11121665472 014436 0 ustar nyo nyo ##############################################################################
#
# Copyright (c) 2006 Zope Corporation 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.schema package
$Id: setup.py 94103 2008-12-16 08:40:10Z nadako $
"""
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.schema',
version = '3.5.0',
author='Zope Corporation and Contributors',
author_email='zope-dev@zope.org',
description='Component Architecture based Vocabulary Registry',
long_description=(
read('README.txt')
+ '\n\n' +
read('src', 'zope', 'app', 'schema', 'README.txt')
+ '\n\n' +
read('CHANGES.txt')
),
keywords = "zope3 vocabulary registry local component",
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.schema',
license='ZPL 2.1',
packages=find_packages('src'),
package_dir = {'': 'src'},
namespace_packages=['zope', 'zope.app'],
extras_require = dict(test=['zope.app.testing']),
install_requires=['setuptools',
'zope.component',
'zope.interface',
'zope.schema',
],
include_package_data = True,
zip_safe = False,
)
zope.app.schema-3.5.0/README.txt 0000644 0001750 0001750 00000000112 11121664333 014376 0 ustar nyo nyo This package provides a component architecture based vocabulary registry.
zope.app.schema-3.5.0/CHANGES.txt 0000644 0001750 0001750 00000000377 11121664333 014526 0 ustar nyo nyo =======
CHANGES
=======
3.5.0 (2008-12-16)
------------------
- Remove deprecated ``vocabulary`` directive.
- Add test for component-based vocabulary registry.
3.4.0 (2007-10-27)
------------------
- Initial release independent of the main Zope tree.
zope.app.schema-3.5.0/buildout.cfg 0000644 0001750 0001750 00000000614 11121664333 015217 0 ustar nyo nyo [buildout]
develop = .
parts = test coverage-test coverage-report
[test]
recipe = zc.recipe.testrunner
eggs = zope.app.schema [test]
[coverage-test]
recipe = zc.recipe.testrunner
eggs = zope.app.schema [test]
defaults = ['--coverage', '../../coverage']
[coverage-report]
recipe = zc.recipe.egg
eggs = z3c.coverage
scripts = coverage=coverage-report
arguments = ('coverage', 'coverage/report')