[Checkins] SVN: Sandbox/ulif/ZConfigParser/ZConfigParser/ Make tests work again.
Uli Fouquet
uli at gnufix.de
Mon Apr 6 03:49:37 EDT 2009
Log message for revision 98908:
Make tests work again.
Changed:
U Sandbox/ulif/ZConfigParser/ZConfigParser/__init__.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/cfgparser.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/cmdline.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/component.xml
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/mapping.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/mapping.xml
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/tests/test_mapping.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/__init__.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/abstract.xml
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/base-logger.xml
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/component.xml
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/datatypes.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/eventlog.xml
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/handlers.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/handlers.xml
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/logger.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/logger.xml
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/loghandler.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/tests/test_logger.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/datatypes.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/info.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/loader.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/matcher.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/schema.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/schemaless.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/schemaless.txt
U Sandbox/ulif/ZConfigParser/ZConfigParser/substitution.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/tests/input/base-datatype1.xml
U Sandbox/ulif/ZConfigParser/ZConfigParser/tests/input/base-datatype2.xml
U Sandbox/ulif/ZConfigParser/ZConfigParser/tests/input/base-keytype2.xml
U Sandbox/ulif/ZConfigParser/ZConfigParser/tests/support.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_cfgimports.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_cmdline.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_config.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_cookbook.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_datatypes.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_loader.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_schema.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_schemaless.py
U Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_subst.py
-=-
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/__init__.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/__init__.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/__init__.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -13,14 +13,14 @@
##############################################################################
"""Structured, schema-driven configuration library.
-ZConfig is a configuration library intended for general use. It
+ZConfigParser is a configuration library intended for general use. It
supports a hierarchical schema-driven configuration model that allows
a schema to specify data conversion routines written in Python.
-ZConfig's model is very different from the model supported by the
+ZConfigParser's model is very different from the model supported by the
ConfigParser module found in Python's standard library, and is more
suitable to configuration-intensive applications.
-ZConfig schema are written in an XML-based language and are able to
+ZConfigParser schema are written in an XML-based language and are able to
``import`` schema components provided by Python packages. Since
components are able to bind to conversion functions provided by Python
code in the package (or elsewhere), configuration objects can be
@@ -38,12 +38,12 @@
version_info = (2, 3)
__version__ = ".".join([str(n) for n in version_info])
-from ZConfig.loader import loadConfig, loadConfigFile
-from ZConfig.loader import loadSchema, loadSchemaFile
+from ZConfigParser.loader import loadConfig, loadConfigFile
+from ZConfigParser.loader import loadSchema, loadSchemaFile
class ConfigurationError(Exception):
- """Base class for ZConfig exceptions."""
+ """Base class for ZConfigParser exceptions."""
# The 'message' attribute was deprecated for BaseException with
# Python 2.6; here we create descriptor properties to continue using it
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/cfgparser.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/cfgparser.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/cfgparser.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -13,13 +13,13 @@
##############################################################################
"""Configuration parser."""
-import ZConfig
-import ZConfig.url
+import ZConfigParser
+import ZConfigParser.url
-from ZConfig.substitution import isname, substitute
+from ZConfigParser.substitution import isname, substitute
-class ZConfigParser:
+class ZConfigParserParser:
__metaclass__ = type
__slots__ = ('resource', 'context', 'lineno',
'stack', 'defines', 'file', 'url')
@@ -88,7 +88,7 @@
name = self._normalize_case(name)
try:
newsect = self.context.startSection(section, type, name)
- except ZConfig.ConfigurationError, e:
+ except ZConfigParser.ConfigurationError, e:
self.error(e[0])
if isempty:
@@ -108,7 +108,7 @@
try:
self.context.endSection(
prevsection, type, name, section)
- except ZConfig.ConfigurationError, e:
+ except ZConfigParser.ConfigurationError, e:
self.error(e[0])
return prevsection
@@ -123,7 +123,7 @@
value = self.replace(value)
try:
section.addValue(key, value, (self.lineno, None, self.url))
- except ZConfig.ConfigurationError, e:
+ except ZConfigParser.ConfigurationError, e:
self.error(e[0])
def handle_directive(self, section, rest):
@@ -150,7 +150,7 @@
def handle_include(self, section, rest):
rest = self.replace(rest.strip())
- newurl = ZConfig.url.urljoin(self.url, rest)
+ newurl = ZConfigParser.url.urljoin(self.url, rest)
self.context.includeConfiguration(section, newurl, self.defines)
def handle_define(self, section, rest):
@@ -168,13 +168,13 @@
def replace(self, text):
try:
return substitute(text, self.defines)
- except ZConfig.SubstitutionReplacementError, e:
+ except ZConfigParser.SubstitutionReplacementError, e:
e.lineno = self.lineno
e.url = self.url
raise
def error(self, message):
- raise ZConfig.ConfigurationSyntaxError(message, self.url, self.lineno)
+ raise ZConfigParser.ConfigurationSyntaxError(message, self.url, self.lineno)
def _normalize_case(self, string):
# This method is factored out solely to allow subclasses to modify
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/cmdline.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/cmdline.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/cmdline.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -21,21 +21,21 @@
some/path/to/key=value
"""
-import ZConfig
-import ZConfig.loader
-import ZConfig.matcher
+import ZConfigParser
+import ZConfigParser.loader
+import ZConfigParser.matcher
-class ExtendedConfigLoader(ZConfig.loader.ConfigLoader):
+class ExtendedConfigLoader(ZConfigParser.loader.ConfigLoader):
def __init__(self, schema):
- ZConfig.loader.ConfigLoader.__init__(self, schema)
+ ZConfigParser.loader.ConfigLoader.__init__(self, schema)
self.clopts = [] # [(optpath, value, source-position), ...]
def addOption(self, spec, pos=None):
if pos is None:
pos = "<command-line option>", -1, -1
if "=" not in spec:
- e = ZConfig.ConfigurationSyntaxError(
+ e = ZConfigParser.ConfigurationSyntaxError(
"invalid configuration specifier", *pos)
e.specifier = spec
raise e
@@ -45,7 +45,7 @@
optpath = opt.split("/")
if "" in optpath:
# // is not allowed in option path
- e = ZConfig.ConfigurationSyntaxError(
+ e = ZConfigParser.ConfigurationSyntaxError(
"'//' is not allowed in an option path", *pos)
e.specifier = spec
raise e
@@ -56,7 +56,7 @@
sm = ExtendedSchemaMatcher(self.schema)
sm.set_optionbag(self.cook())
else:
- sm = ZConfig.loader.ConfigLoader.createSchemaMatcher(self)
+ sm = ZConfigParser.loader.ConfigLoader.createSchemaMatcher(self)
return sm
def cook(self):
@@ -85,7 +85,7 @@
try:
return self._basic_key(s)
except ValueError:
- raise ZConfig.ConfigurationSyntaxError(
+ raise ZConfigParser.ConfigurationSyntaxError(
"could not convert basic-key value", *pos)
def add_value(self, name, val, pos):
@@ -135,7 +135,7 @@
def finish(self):
if self.sectitems or self.keypairs:
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"not all command line options were consumed")
def _normalize_case(self, string):
@@ -150,13 +150,13 @@
try:
realkey = self.type.keytype(key)
except ValueError, e:
- raise ZConfig.DataConversionError(e, key, position)
+ raise ZConfigParser.DataConversionError(e, key, position)
if self.optionbag.has_key(realkey):
return
- ZConfig.matcher.BaseMatcher.addValue(self, key, value, position)
+ ZConfigParser.matcher.BaseMatcher.addValue(self, key, value, position)
def createChildMatcher(self, type, name):
- sm = ZConfig.matcher.BaseMatcher.createChildMatcher(self, type, name)
+ sm = ZConfigParser.matcher.BaseMatcher.createChildMatcher(self, type, name)
bag = self.optionbag.get_section_info(type.name, name)
if bag is not None:
sm = ExtendedSectionMatcher(
@@ -167,16 +167,16 @@
def finish_optionbag(self):
for key in self.optionbag.keys():
for val, pos in self.optionbag.get_key(key):
- ZConfig.matcher.BaseMatcher.addValue(self, key, val, pos)
+ ZConfigParser.matcher.BaseMatcher.addValue(self, key, val, pos)
self.optionbag.finish()
-class ExtendedSectionMatcher(MatcherMixin, ZConfig.matcher.SectionMatcher):
+class ExtendedSectionMatcher(MatcherMixin, ZConfigParser.matcher.SectionMatcher):
def finish(self):
self.finish_optionbag()
- return ZConfig.matcher.SectionMatcher.finish(self)
+ return ZConfigParser.matcher.SectionMatcher.finish(self)
-class ExtendedSchemaMatcher(MatcherMixin, ZConfig.matcher.SchemaMatcher):
+class ExtendedSchemaMatcher(MatcherMixin, ZConfigParser.matcher.SchemaMatcher):
def finish(self):
self.finish_optionbag()
- return ZConfig.matcher.SchemaMatcher.finish(self)
+ return ZConfigParser.matcher.SchemaMatcher.finish(self)
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/component.xml
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/component.xml 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/component.xml 2009-04-06 07:49:37 UTC (rev 98908)
@@ -4,6 +4,6 @@
loaded.
</description>
- <import package="ZConfig.components.basic" file="mapping.xml"/>
+ <import package="ZConfigParser.components.basic" file="mapping.xml"/>
</component>
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/mapping.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/mapping.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/mapping.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -12,7 +12,7 @@
#
##############################################################################
-"""Python datatype for the ZConfig.components.basic.mapping section type."""
+"""Python datatype for the ZConfigParser.components.basic.mapping section type."""
def mapping(section):
return section.mapping
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/mapping.xml
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/mapping.xml 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/mapping.xml 2009-04-06 07:49:37 UTC (rev 98908)
@@ -1,25 +1,25 @@
<component>
- <sectiontype name="ZConfig.basic.mapping"
- datatype="ZConfig.components.basic.mapping.mapping">
+ <sectiontype name="ZConfigParser.basic.mapping"
+ datatype="ZConfigParser.components.basic.mapping.mapping">
<description>
Section that provides a simple mapping implementation. An
application should derive a more specific section type for use
in configuration files:
- <import package="ZConfig.components.basic"
+ <import package="ZConfigParser.components.basic"
file="mapping.xml"
/>
<sectiontype name="mapping"
- extends="ZConfig.basic.mapping"
+ extends="ZConfigParser.basic.mapping"
/>
If a non-standard keytype is needed, it can be overridden as
well:
<sectiontype name="system-map"
- extends="ZConfig.basic.mapping"
+ extends="ZConfigParser.basic.mapping"
keytype="mypkg.datatypes.system_name"
/>
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/tests/test_mapping.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/tests/test_mapping.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/basic/tests/test_mapping.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -13,22 +13,22 @@
##############################################################################
"""Tests of the 'basic' section types provided as part of
-ZConfig.components.basic."""
+ZConfigParser.components.basic."""
import unittest
-from ZConfig.tests import support
+from ZConfigParser.tests import support
SIMPLE_SCHEMA = '''\
<schema>
- <import package="ZConfig.components.basic" file="mapping.xml" />
+ <import package="ZConfigParser.components.basic" file="mapping.xml" />
<sectiontype name="dict"
- extends="ZConfig.basic.mapping" />
+ extends="ZConfigParser.basic.mapping" />
<sectiontype name="intkeys"
- extends="ZConfig.basic.mapping"
+ extends="ZConfigParser.basic.mapping"
keytype="integer" />
<section name="*"
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/__init__.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/__init__.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/__init__.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -11,7 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""ZConfig schema component package for logging configuration."""
+"""ZConfigParser schema component package for logging configuration."""
# Make sure we can't import this if "logging" isn't available; we
# don't want partial imports to appear to succeed.
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/abstract.xml
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/abstract.xml 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/abstract.xml 2009-04-06 07:49:37 UTC (rev 98908)
@@ -2,6 +2,6 @@
<description>
</description>
- <abstracttype name="ZConfig.logger.handler"/>
- <abstracttype name="ZConfig.logger.log"/>
+ <abstracttype name="ZConfigParser.logger.handler"/>
+ <abstracttype name="ZConfigParser.logger.log"/>
</component>
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/base-logger.xml
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/base-logger.xml 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/base-logger.xml 2009-04-06 07:49:37 UTC (rev 98908)
@@ -1,16 +1,16 @@
-<component prefix="ZConfig.components.logger.logger">
+<component prefix="ZConfigParser.components.logger.logger">
- <import package="ZConfig.components.logger" file="abstract.xml"/>
+ <import package="ZConfigParser.components.logger" file="abstract.xml"/>
- <sectiontype name="ZConfig.logger.base-logger">
+ <sectiontype name="ZConfigParser.logger.base-logger">
<description>
Base definition for the logger types defined by
- ZConfig.components.logger. This exists entirely to provide
+ ZConfigParser.components.logger. This exists entirely to provide
shared key definitions and documentation.
</description>
<key name="level"
- datatype="ZConfig.components.logger.datatypes.logging_level"
+ datatype="ZConfigParser.components.logger.datatypes.logging_level"
default="info">
<description>
Verbosity setting for the logger. Values must be a name of
@@ -36,7 +36,7 @@
</description>
</key>
- <multisection type="ZConfig.logger.handler"
+ <multisection type="ZConfigParser.logger.handler"
attribute="handlers" name="*">
<description>
Handlers to install on this logger. Each handler describes
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/component.xml
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/component.xml 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/component.xml 2009-04-06 07:49:37 UTC (rev 98908)
@@ -1,10 +1,10 @@
-<component prefix="ZConfig.components.logger.datatypes">
+<component prefix="ZConfigParser.components.logger.datatypes">
<description>
</description>
- <import package="ZConfig.components.logger" file="abstract.xml"/>
- <import package="ZConfig.components.logger" file="handlers.xml"/>
- <import package="ZConfig.components.logger" file="logger.xml"/>
- <import package="ZConfig.components.logger" file="eventlog.xml"/>
+ <import package="ZConfigParser.components.logger" file="abstract.xml"/>
+ <import package="ZConfigParser.components.logger" file="handlers.xml"/>
+ <import package="ZConfigParser.components.logger" file="logger.xml"/>
+ <import package="ZConfigParser.components.logger" file="eventlog.xml"/>
</component>
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/datatypes.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/datatypes.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/datatypes.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -11,7 +11,7 @@
#
##############################################################################
-"""ZConfig datatypes for logging support."""
+"""ZConfigParser datatypes for logging support."""
_logging_levels = {
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/eventlog.xml
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/eventlog.xml 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/eventlog.xml 2009-04-06 07:49:37 UTC (rev 98908)
@@ -1,12 +1,12 @@
-<component prefix="ZConfig.components.logger.logger">
+<component prefix="ZConfigParser.components.logger.logger">
- <import package="ZConfig.components.logger" file="abstract.xml"/>
- <import package="ZConfig.components.logger" file="base-logger.xml"/>
+ <import package="ZConfigParser.components.logger" file="abstract.xml"/>
+ <import package="ZConfigParser.components.logger" file="base-logger.xml"/>
<sectiontype name="eventlog"
datatype=".EventLogFactory"
- extends="ZConfig.logger.base-logger"
- implements="ZConfig.logger.log">
+ extends="ZConfigParser.logger.base-logger"
+ implements="ZConfigParser.logger.log">
<description>
Configuration for the root logger.
</description>
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/handlers.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/handlers.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/handlers.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -11,11 +11,11 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""ZConfig factory datatypes for log handlers."""
+"""ZConfigParser factory datatypes for log handlers."""
import sys
-from ZConfig.components.logger.factory import Factory
+from ZConfigParser.components.logger.factory import Factory
_log_format_variables = {
@@ -93,7 +93,7 @@
class FileHandlerFactory(HandlerFactory):
def create_loghandler(self):
- from ZConfig.components.logger import loghandler
+ from ZConfigParser.components.logger import loghandler
path = self.section.path
max_bytes = self.section.max_size
old_files = self.section.old_files
@@ -161,13 +161,13 @@
class SyslogHandlerFactory(HandlerFactory):
def create_loghandler(self):
- from ZConfig.components.logger import loghandler
+ from ZConfigParser.components.logger import loghandler
return loghandler.SysLogHandler(self.section.address.address,
self.section.facility)
class Win32EventLogFactory(HandlerFactory):
def create_loghandler(self):
- from ZConfig.components.logger import loghandler
+ from ZConfigParser.components.logger import loghandler
return loghandler.Win32EventLogHandler(self.section.appname)
def http_handler_url(value):
@@ -200,13 +200,13 @@
class HTTPHandlerFactory(HandlerFactory):
def create_loghandler(self):
- from ZConfig.components.logger import loghandler
+ from ZConfigParser.components.logger import loghandler
host, selector = self.section.url
return loghandler.HTTPHandler(host, selector, self.section.method)
class SMTPHandlerFactory(HandlerFactory):
def create_loghandler(self):
- from ZConfig.components.logger import loghandler
+ from ZConfigParser.components.logger import loghandler
host, port = self.section.smtp_server
if not port:
mailhost = host
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/handlers.xml
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/handlers.xml 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/handlers.xml 2009-04-06 07:49:37 UTC (rev 98908)
@@ -1,10 +1,10 @@
-<component prefix="ZConfig.components.logger.handlers">
+<component prefix="ZConfigParser.components.logger.handlers">
<description>
</description>
- <import package="ZConfig.components.logger" file="abstract.xml"/>
+ <import package="ZConfigParser.components.logger" file="abstract.xml"/>
- <sectiontype name="ZConfig.logger.base-log-handler">
+ <sectiontype name="ZConfigParser.logger.base-log-handler">
<description>
Base type for most log handlers. This is cannot be used as a
loghandler directly since it doesn't implement the loghandler
@@ -22,13 +22,13 @@
default="%Y-%m-%dT%H:%M:%S"/>
<key name="level"
default="notset"
- datatype="ZConfig.components.logger.datatypes.logging_level"/>
+ datatype="ZConfigParser.components.logger.datatypes.logging_level"/>
</sectiontype>
<sectiontype name="logfile"
datatype=".FileHandlerFactory"
- implements="ZConfig.logger.handler"
- extends="ZConfig.logger.base-log-handler">
+ implements="ZConfigParser.logger.handler"
+ extends="ZConfigParser.logger.base-log-handler">
<key name="path" required="yes"/>
<key name="old-files" required="no" default="0" datatype="integer"/>
<key name="max-size" required="no" default="0" datatype="byte-size"/>
@@ -41,8 +41,8 @@
<sectiontype name="syslog"
datatype=".SyslogHandlerFactory"
- implements="ZConfig.logger.handler"
- extends="ZConfig.logger.base-log-handler">
+ implements="ZConfigParser.logger.handler"
+ extends="ZConfigParser.logger.base-log-handler">
<key name="facility" default="user" datatype=".syslog_facility"/>
<key name="address" datatype="socket-address" default="localhost:514"/>
<key name="format"
@@ -52,8 +52,8 @@
<sectiontype name="win32-eventlog"
datatype=".Win32EventLogFactory"
- implements="ZConfig.logger.handler"
- extends="ZConfig.logger.base-log-handler">
+ implements="ZConfigParser.logger.handler"
+ extends="ZConfigParser.logger.base-log-handler">
<key name="appname" default="Zope"/>
<key name="format"
default="%(levelname)s %(name)s %(message)s"
@@ -62,8 +62,8 @@
<sectiontype name="http-logger"
datatype=".HTTPHandlerFactory"
- implements="ZConfig.logger.handler"
- extends="ZConfig.logger.base-log-handler">
+ implements="ZConfigParser.logger.handler"
+ extends="ZConfigParser.logger.base-log-handler">
<key name="url" default="http://localhost/" datatype=".http_handler_url"/>
<key name="method" default="GET" datatype=".get_or_post"/>
<key name="format"
@@ -73,8 +73,8 @@
<sectiontype name="email-notifier"
datatype=".SMTPHandlerFactory"
- implements="ZConfig.logger.handler"
- extends="ZConfig.logger.base-log-handler">
+ implements="ZConfigParser.logger.handler"
+ extends="ZConfigParser.logger.base-log-handler">
<key name="from" required="yes" attribute="fromaddr"/>
<multikey name="to" required="yes" attribute="toaddrs"/>
<key name="subject" default="Message from Zope"/>
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/logger.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/logger.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/logger.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -11,9 +11,9 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""ZConfig factory datatypes for loggers."""
+"""ZConfigParser factory datatypes for loggers."""
-from ZConfig.components.logger.factory import Factory
+from ZConfigParser.components.logger.factory import Factory
class LoggerFactoryBase(Factory):
@@ -42,7 +42,7 @@
handler = handler_factory()
logger.addHandler(handler)
else:
- from ZConfig.components.logger import loghandler
+ from ZConfigParser.components.logger import loghandler
logger.addHandler(loghandler.NullHandler())
return logger
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/logger.xml
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/logger.xml 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/logger.xml 2009-04-06 07:49:37 UTC (rev 98908)
@@ -1,15 +1,15 @@
-<component prefix="ZConfig.components.logger.logger">
+<component prefix="ZConfigParser.components.logger.logger">
<description>
</description>
- <import package="ZConfig.components.logger" file="abstract.xml"/>
- <import package="ZConfig.components.logger" file="base-logger.xml"/>
- <import package="ZConfig.components.logger" file="eventlog.xml"/>
+ <import package="ZConfigParser.components.logger" file="abstract.xml"/>
+ <import package="ZConfigParser.components.logger" file="base-logger.xml"/>
+ <import package="ZConfigParser.components.logger" file="eventlog.xml"/>
<sectiontype name="logger"
datatype=".LoggerFactory"
- extends="ZConfig.logger.base-logger"
- implements="ZConfig.logger.log">
+ extends="ZConfigParser.logger.base-logger"
+ implements="ZConfigParser.logger.log">
<key name="propagate"
datatype="boolean"
default="true">
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/loghandler.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/loghandler.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/loghandler.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -30,7 +30,7 @@
_reopenable_handlers = []
def closeFiles():
- """Reopen all logfiles managed by ZConfig configuration."""
+ """Reopen all logfiles managed by ZConfigParser configuration."""
while _reopenable_handlers:
wr = _reopenable_handlers.pop()
h = wr()
@@ -38,7 +38,7 @@
h.close()
def reopenFiles():
- """Reopen all logfiles managed by ZConfig configuration."""
+ """Reopen all logfiles managed by ZConfigParser configuration."""
for wr in _reopenable_handlers[:]:
h = wr()
if h is None:
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/tests/test_logger.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/tests/test_logger.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/components/logger/tests/test_logger.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -12,7 +12,7 @@
#
##############################################################################
-"""Tests for logging configuration via ZConfig."""
+"""Tests for logging configuration via ZConfigParser."""
import cStringIO as StringIO
import logging
@@ -21,11 +21,11 @@
import tempfile
import unittest
-import ZConfig
+import ZConfigParser
-from ZConfig.components.logger import datatypes
-from ZConfig.components.logger import handlers
-from ZConfig.components.logger import loghandler
+from ZConfigParser.components.logger import datatypes
+from ZConfigParser.components.logger import handlers
+from ZConfigParser.components.logger import loghandler
class CustomFormatter(logging.Formatter):
@@ -89,11 +89,11 @@
def get_schema(self):
if self._schema is None:
sio = StringIO.StringIO(self._schematext)
- self.__class__._schema = ZConfig.loadSchemaFile(sio)
+ self.__class__._schema = ZConfigParser.loadSchemaFile(sio)
return self._schema
def get_config(self, text):
- conf, handler = ZConfig.loadConfigFile(self.get_schema(),
+ conf, handler = ZConfigParser.loadConfigFile(self.get_schema(),
StringIO.StringIO(text))
self.assert_(not handler)
return conf
@@ -103,7 +103,7 @@
_schematext = """
<schema>
- <import package='ZConfig.components.logger'/>
+ <import package='ZConfigParser.components.logger'/>
<section type='eventlog' name='*' attribute='eventlog'/>
</schema>
"""
@@ -268,7 +268,7 @@
conf = self.get_config("""
<eventlog>
<logfile>
- formatter ZConfig.components.logger.tests.test_logger.CustomFormatter
+ formatter ZConfigParser.components.logger.tests.test_logger.CustomFormatter
level info
path STDOUT
</logfile>
@@ -361,7 +361,7 @@
_schematext = """
<schema>
- <import package='ZConfig.components.logger'/>
+ <import package='ZConfigParser.components.logger'/>
<multisection type='logger' name='*' attribute='loggers'/>
</schema>
"""
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/datatypes.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/datatypes.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/datatypes.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -11,7 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Selection of standard datatypes for ZConfig."""
+"""Selection of standard datatypes for ZConfigParser."""
import os
import re
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/info.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/info.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/info.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -11,11 +11,11 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Objects that can describe a ZConfig schema."""
+"""Objects that can describe a ZConfigParser schema."""
import copy
-import ZConfig
+import ZConfigParser
class UnboundedThing:
@@ -59,7 +59,7 @@
try:
return datatype(self.value)
except ValueError, e:
- raise ZConfig.DataConversionError(e, self.value, self.position)
+ raise ZConfigParser.DataConversionError(e, self.value, self.position)
class BaseInfo:
@@ -73,10 +73,10 @@
attribute):
if maxOccurs is not None and maxOccurs < 1:
if maxOccurs < 1:
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"maxOccurs must be at least 1")
if minOccurs is not None and minOccurs < maxOccurs:
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"minOccurs must be at least maxOccurs")
self.name = name
self.datatype = datatype
@@ -112,20 +112,20 @@
def finish(self):
if self._finished:
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"cannot finish KeyInfo more than once")
self._finished = True
def adddefault(self, value, position, key=None):
if self._finished:
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"cannot add default values to finished KeyInfo")
# Check that the name/keyed relationship is right:
if self.name == "+" and key is None:
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"default values must be keyed for name='+'")
elif self.name != "+" and key is not None:
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"unexpected key for default value")
self.add_valueinfo(ValueInfo(value, position), key)
@@ -164,11 +164,11 @@
if self._default.has_key(key):
# not ideal: we're presenting the unconverted
# version of the key
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"duplicate default value for key %s" % `key`)
self._default[key] = vi
elif self._default is not None:
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"cannot set more than one default to key with maxOccurs == 1")
else:
self._default = vi
@@ -231,11 +231,11 @@
# attribute - name of the attribute on the SectionValue object
if maxOccurs > 1:
if name not in ('*', '+'):
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"sections which can occur more than once must"
" use a name of '*' or '+'")
if not attribute:
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"sections which can occur more than once must"
" specify a target attribute name")
if sectiontype.isabstract():
@@ -291,7 +291,7 @@
try:
return self._subtypes[name]
except KeyError:
- raise ZConfig.SchemaError("no sectiontype %s in abstracttype %s"
+ raise ZConfigParser.SchemaError("no sectiontype %s in abstracttype %s"
% (`name`, `self.name`))
def hassubtype(self, name):
@@ -331,7 +331,7 @@
try:
return self._types[n]
except KeyError:
- raise ZConfig.SchemaError("unknown type name: " + `name`)
+ raise ZConfigParser.SchemaError("unknown type name: " + `name`)
def gettypenames(self):
return self._types.keys()
@@ -346,10 +346,10 @@
# check naming constraints
assert key or info.attribute
if key and self._keymap.has_key(key):
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"child name %s already used" % key)
if info.attribute and self._attrmap.has_key(info.attribute):
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"child attribute name %s already used" % info.attribute)
# a-ok, add the item to the appropriate maps
if info.attribute:
@@ -367,12 +367,12 @@
def getinfo(self, key):
if not key:
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"cannot match a key without a name")
try:
return self._keymap[key]
except KeyError:
- raise ZConfig.ConfigurationError("no key matching " + `key`)
+ raise ZConfigParser.ConfigurationError("no key matching " + `key`)
def getrequiredtypes(self):
d = {}
@@ -394,40 +394,40 @@
if key:
if key == name:
if not info.issection():
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"section name %s already in use for key" % key)
st = info.sectiontype
if st.isabstract():
try:
st = st.getsubtype(type)
- except ZConfig.ConfigurationError:
- raise ZConfig.ConfigurationError(
+ except ZConfigParser.ConfigurationError:
+ raise ZConfigParser.ConfigurationError(
"section type %s not allowed for name %s"
% (`type`, `key`))
if not st.name == type:
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"name %s must be used for a %s section"
% (`name`, `st.name`))
return info
# else must be a sectiontype or an abstracttype:
elif info.sectiontype.name == type:
if not (name or info.allowUnnamed()):
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
`type` + " sections must be named")
return info
elif info.sectiontype.isabstract():
st = info.sectiontype
if st.name == type:
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"cannot define section with an abstract type")
try:
st = st.getsubtype(type)
- except ZConfig.ConfigurationError:
+ except ZConfigParser.ConfigurationError:
# not this one; maybe a different one
pass
else:
return info
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"no matching section defined for type='%s', name='%s'" % (
type, name))
@@ -447,7 +447,7 @@
def addtype(self, typeinfo):
n = typeinfo.name
if self._types.has_key(n):
- raise ZConfig.SchemaError("type name cannot be redefined: "
+ raise ZConfigParser.SchemaError("type name cannot be redefined: "
+ `typeinfo.name`)
self._types[n] = typeinfo
@@ -477,7 +477,7 @@
def deriveSectionType(self, base, name, keytype, valuetype, datatype):
if isinstance(base, SchemaType):
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"cannot derive sectiontype from top-level schema")
t = self.createSectionType(name, keytype, valuetype, datatype)
t._attrmap.update(base._attrmap)
@@ -495,7 +495,7 @@
def addComponent(self, name):
if self._components.has_key(name):
- raise ZConfig.SchemaError("already have component %s" % name)
+ raise ZConfigParser.SchemaError("already have component %s" % name)
self._components[name] = name
def hasComponent(self, name):
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/loader.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/loader.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/loader.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -19,13 +19,13 @@
import urllib
import urllib2
-import ZConfig
-import ZConfig.cfgparser
-import ZConfig.datatypes
-import ZConfig.info
-import ZConfig.matcher
-import ZConfig.schema
-import ZConfig.url
+import ZConfigParser
+import ZConfigParser.cfgparser
+import ZConfigParser.datatypes
+import ZConfigParser.info
+import ZConfigParser.matcher
+import ZConfigParser.schema
+import ZConfigParser.url
def loadSchema(url):
@@ -43,7 +43,7 @@
def _get_config_loader(schema, overrides):
if overrides:
- from ZConfig import cmdline
+ from ZConfigParser import cmdline
loader = cmdline.ExtendedConfigLoader(schema)
for opt in overrides:
loader.addOption(opt)
@@ -114,16 +114,16 @@
else:
what = "URL"
ident = url
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"error opening %s %s: %s" % (what, ident, message),
url)
def normalizeURL(self, url):
if self.isPath(url):
url = "file://" + urllib.pathname2url(os.path.abspath(url))
- newurl, fragment = ZConfig.url.urldefrag(url)
+ newurl, fragment = ZConfigParser.url.urldefrag(url)
if fragment:
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"fragment identifiers are not supported",
url)
return newurl
@@ -152,12 +152,12 @@
if os.path.exists(filename):
break
else:
- raise ZConfig.SchemaResourceError("schema component not found",
+ raise ZConfigParser.SchemaResourceError("schema component not found",
filename=path,
package=package,
path=pkg.__path__)
url = "file:" + urllib.pathname2url(filename)
- url = ZConfig.url.urlnormalize(url)
+ url = ZConfigParser.url.urlnormalize(url)
return urllib2.urlopen(url)
else:
loadpath = os.path.join(os.path.dirname(pkg.__file__), path)
@@ -175,7 +175,7 @@
class SchemaLoader(BaseLoader):
def __init__(self, registry=None):
if registry is None:
- registry = ZConfig.datatypes.Registry()
+ registry = ZConfigParser.datatypes.Registry()
BaseLoader.__init__(self)
self.registry = registry
self._cache = {}
@@ -184,7 +184,7 @@
if resource.url and self._cache.has_key(resource.url):
schema = self._cache[resource.url]
else:
- schema = ZConfig.schema.parseResource(resource, self)
+ schema = ZConfigParser.schema.parseResource(resource, self)
self._cache[resource.url] = schema
return schema
@@ -193,23 +193,23 @@
def schemaComponentSource(self, package, file):
parts = package.split(".")
if not parts:
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"illegal schema component name: " + `package`)
if "" in parts:
# '' somewhere in the package spec; still illegal
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"illegal schema component name: " + `package`)
file = file or "component.xml"
try:
__import__(package)
except ImportError, e:
- raise ZConfig.SchemaResourceError(
+ raise ZConfigParser.SchemaResourceError(
"could not load package %s: %s" % (package, str(e)),
filename=file,
package=package)
pkg = sys.modules[package]
if not hasattr(pkg, "__path__"):
- raise ZConfig.SchemaResourceError(
+ raise ZConfigParser.SchemaResourceError(
"import name does not refer to a package",
filename=file, package=package)
return "package:%s:%s" % (package, file)
@@ -218,7 +218,7 @@
class ConfigLoader(BaseLoader):
def __init__(self, schema):
if schema.isabstract():
- raise ZConfig.SchemaError(
+ raise ZConfigParser.SchemaError(
"cannot check a configuration an abstract type")
BaseLoader.__init__(self)
self.schema = schema
@@ -231,14 +231,14 @@
return result
def createSchemaMatcher(self):
- return ZConfig.matcher.SchemaMatcher(self.schema)
+ return ZConfigParser.matcher.SchemaMatcher(self.schema)
# config parser support API
def startSection(self, parent, type, name):
t = self.schema.gettype(type)
if t.isabstract():
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"concrete sections cannot match abstract section types;"
" found abstract type " + `type`)
return parent.createChildMatcher(t, name)
@@ -252,7 +252,7 @@
if not self._private_schema:
# replace the schema with an extended schema on the first %import
self._loader = SchemaLoader(self.schema.registry)
- schema = ZConfig.info.createDerivedSchema(self.schema)
+ schema = ZConfigParser.info.createDerivedSchema(self.schema)
self._private_schema = True
self.schema = schema
url = self._loader.schemaComponentSource(pkgname, '')
@@ -261,7 +261,7 @@
resource = self.openResource(url)
schema.addComponent(url)
try:
- ZConfig.schema.parseComponent(resource, self._loader, schema)
+ ZConfigParser.schema.parseComponent(resource, self._loader, schema)
finally:
resource.close()
@@ -276,7 +276,7 @@
# internal helper
def _parse_resource(self, matcher, resource, defines=None):
- parser = ZConfig.cfgparser.ZConfigParser(resource, self, defines)
+ parser = ZConfigParser.cfgparser.ZConfigParserParser(resource, self, defines)
parser.parse(matcher)
@@ -291,7 +291,7 @@
for name, callback in handlermap.items():
n = self._convert(name)
if d.has_key(n):
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"handler name not unique when converted to a basic-key: "
+ `name`)
d[n] = callback
@@ -300,7 +300,7 @@
if not d.has_key(handler):
L.append(handler)
if L:
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"undefined handlers: " + ", ".join(L))
for handler, value in self._handlers:
f = d[handler]
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/matcher.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/matcher.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/matcher.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -13,9 +13,9 @@
##############################################################################
"""Utility that manages the binding of configuration data to a section."""
-import ZConfig
+import ZConfigParser
-from ZConfig.info import ValueInfo
+from ZConfigParser.info import ValueInfo
class BaseMatcher:
@@ -45,7 +45,7 @@
def addSection(self, type, name, sectvalue):
if name:
if self._sectionnames.has_key(name):
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"section names must not be re-used within the"
" same container:" + `name`)
self._sectionnames[name] = name
@@ -57,14 +57,14 @@
elif v is None:
self._values[attr] = sectvalue
else:
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"too many instances of %s section" % `ci.sectiontype.name`)
def addValue(self, key, value, position):
try:
realkey = self.type.keytype(key)
except ValueError, e:
- raise ZConfig.DataConversionError(e, key, position)
+ raise ZConfigParser.DataConversionError(e, key, position)
arbkey_info = None
for i in range(len(self.type)):
k, ci = self.type[i]
@@ -74,7 +74,7 @@
arbkey_info = k, ci
else:
if arbkey_info is None:
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
`key` + " is not a known key name")
k, ci = arbkey_info
if ci.issection():
@@ -82,7 +82,7 @@
extra = " in %s sections" % `self.type.name`
else:
extra = ""
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"%s is not a valid key name%s" % (`key`, extra))
ismulti = ci.ismulti()
@@ -97,10 +97,10 @@
self._values[attr] = v
elif not ismulti:
if k != '+':
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
`key` + " does not support multiple values")
elif len(v) == ci.maxOccurs:
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"too many values for " + `name`)
value = ValueInfo(value, position)
@@ -112,7 +112,7 @@
v[realkey] = [value]
else:
if v.has_key(realkey):
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"too many values for " + `key`)
v[realkey] = value
elif ismulti:
@@ -124,7 +124,7 @@
ci = self.type.getsectioninfo(type.name, name)
assert not ci.isabstract()
if not ci.isAllowedName(name):
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"%s is not an allowed name for %s sections"
% (`name`, `ci.sectiontype.name`))
return SectionMatcher(ci, type, name, self.handlers)
@@ -144,13 +144,13 @@
if ci.name == '+' and not ci.issection():
# v is a dict
if ci.minOccurs > len(v):
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"no keys defined for the %s key/value map; at least %d"
" must be specified" % (attr, ci.minOccurs))
if v is None and ci.minOccurs:
default = ci.getdefault()
if default is None:
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"no values for %s; %s required" % (key, ci.minOccurs))
else:
v = values[attr] = default[:]
@@ -162,7 +162,7 @@
else:
v[:] = default
if len(v) < ci.minOccurs:
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
"not enough values for %s; %d found, %d required"
% (key, len(v), ci.minOccurs))
if v is None and not ci.issection():
@@ -187,7 +187,7 @@
try:
s = st.datatype(s)
except ValueError, e:
- raise ZConfig.DataConversionError(
+ raise ZConfigParser.DataConversionError(
e, s, (-1, -1, None))
v.append(s)
elif ci.name == '+':
@@ -202,7 +202,7 @@
try:
v = st.datatype(values[attr])
except ValueError, e:
- raise ZConfig.DataConversionError(
+ raise ZConfigParser.DataConversionError(
e, values[attr], (-1, -1, None))
else:
v = None
@@ -232,7 +232,7 @@
if name or info.allowUnnamed():
self.name = name
else:
- raise ZConfig.ConfigurationError(
+ raise ZConfigParser.ConfigurationError(
`type.name` + " sections may not be unnamed")
BaseMatcher.__init__(self, info, type, handlers)
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/schema.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/schema.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/schema.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -11,15 +11,15 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Parser for ZConfig schemas."""
+"""Parser for ZConfigParser schemas."""
import os
import xml.sax
-import ZConfig
+import ZConfigParser
-from ZConfig import info
-from ZConfig import url
+from ZConfigParser import info
+from ZConfigParser import url
def parseResource(resource, loader):
@@ -454,7 +454,7 @@
return e
def error(self, message):
- raise self.initerror(ZConfig.SchemaError(message))
+ raise self.initerror(ZConfigParser.SchemaError(message))
class SchemaParser(BaseParser):
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/schemaless.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/schemaless.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/schemaless.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -12,12 +12,12 @@
#
##############################################################################
"""\
-Support for working with ZConfig data without a schema.
+Support for working with ZConfigParser data without a schema.
"""
__docformat__ = "reStructuredText"
-import ZConfig.cfgparser
+import ZConfigParser.cfgparser
def loadConfigFile(file, url=None):
@@ -110,7 +110,7 @@
raise NotImplementedError('includes are not supported')
-class Parser(ZConfig.cfgparser.ZConfigParser):
+class Parser(ZConfigParser.cfgparser.ZConfigParserParser):
def handle_define(self, section, rest):
raise NotImplementedError('defines are not supported')
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/schemaless.txt
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/schemaless.txt 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/schemaless.txt 2009-04-06 07:49:37 UTC (rev 98908)
@@ -1,13 +1,13 @@
-=================================
-Using ZConfig data without schema
-=================================
+=======================================
+Using ZConfigParser data without schema
+=======================================
-Sometimes it's useful to use ZConfig configuration data without a
+Sometimes it's useful to use ZConfigParser configuration data without a
schema. This is most interesting when assembling a configuration from
fragments, as some buildout recipes do. This is not recommended for
general application use.
-The ``ZConfig.schemaless`` module provides some support for working
+The ``ZConfigParser.schemaless`` module provides some support for working
without schema. Something things are not (currently) supported,
including the %define and %include directives. The %import directive
is supported.
@@ -15,7 +15,7 @@
This module provides basic support for loading configuration,
inspecting and modifying it, and re-serializing the result.
- >>> from ZConfig import schemaless
+ >>> from ZConfigParser import schemaless
There is a single function which loads configuration data from a file
open for reading. Let's take a look at this, and what it returns::
@@ -99,7 +99,7 @@
1
In addition, the section has ``type`` and ``name`` attributes that
-record the type and name of the section as ZConfig understands them::
+record the type and name of the section as ZConfigParser understands them::
>>> section.type
'section'
@@ -242,8 +242,8 @@
Limitations
-----------
-There are some limitations of handling ZConfig-based configurations
-using the ``ZConfig.schemaless`` module. Some of these are
+There are some limitations of handling ZConfigParser-based configurations
+using the ``ZConfigParser.schemaless`` module. Some of these are
implementation issues, and may be corrected in the future:
- %define is not supported.
@@ -261,7 +261,7 @@
be equivalent. Examples of this are unusual, but exist.
Limitations related to the non-processing of the schema cannot be
-detected by the ``ZConfig.schemaless``, so no errors are reported in
+detected by the ``ZConfigParser.schemaless``, so no errors are reported in
these situations.
For the strictly syntactic limitations, we do get errors when the
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/substitution.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/substitution.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/substitution.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -11,9 +11,9 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Substitution support for ZConfig values."""
+"""Substitution support for ZConfigParser values."""
-import ZConfig
+import ZConfigParser
def substitute(s, mapping):
@@ -27,7 +27,7 @@
if name:
v = mapping.get(name)
if v is None:
- raise ZConfig.SubstitutionReplacementError(s, namecase)
+ raise ZConfigParser.SubstitutionReplacementError(s, namecase)
result += v
return result
else:
@@ -54,7 +54,7 @@
i = s.find("$")
c = s[i+1:i+2]
if c == "":
- raise ZConfig.SubstitutionSyntaxError(
+ raise ZConfigParser.SubstitutionSyntaxError(
"illegal lone '$' at end of source")
if c == "$":
return s[:i+1], None, None, s[i+2:]
@@ -62,17 +62,17 @@
if c == "{":
m = _name_match(s, i + 2)
if not m:
- raise ZConfig.SubstitutionSyntaxError(
+ raise ZConfigParser.SubstitutionSyntaxError(
"'${' not followed by name")
name = m.group(0)
i = m.end() + 1
if not s.startswith("}", i - 1):
- raise ZConfig.SubstitutionSyntaxError(
+ raise ZConfigParser.SubstitutionSyntaxError(
"'${%s' not followed by '}'" % name)
else:
m = _name_match(s, i+1)
if not m:
- raise ZConfig.SubstitutionSyntaxError(
+ raise ZConfigParser.SubstitutionSyntaxError(
"'$' not followed by '$' or name")
name = m.group(0)
i = m.end()
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/tests/input/base-datatype1.xml
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/tests/input/base-datatype1.xml 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/tests/input/base-datatype1.xml 2009-04-06 07:49:37 UTC (rev 98908)
@@ -1,4 +1,4 @@
-<schema datatype="ZConfig.tests.test_schema.MySection">
+<schema datatype="ZConfigParser.tests.test_schema.MySection">
<sectiontype name="type-1"/>
</schema>
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/tests/input/base-datatype2.xml
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/tests/input/base-datatype2.xml 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/tests/input/base-datatype2.xml 2009-04-06 07:49:37 UTC (rev 98908)
@@ -1,3 +1,3 @@
-<schema datatype="ZConfig.tests.test_schema.appsection">
+<schema datatype="ZConfigParser.tests.test_schema.appsection">
<sectiontype name="type-2"/>
</schema>
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/tests/input/base-keytype2.xml
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/tests/input/base-keytype2.xml 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/tests/input/base-keytype2.xml 2009-04-06 07:49:37 UTC (rev 98908)
@@ -1,3 +1,3 @@
-<schema keytype="ZConfig.tests.test_schema.uppercase">
+<schema keytype="ZConfigParser.tests.test_schema.uppercase">
<sectiontype name="type-2"/>
</schema>
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/tests/support.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/tests/support.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/tests/support.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -19,10 +19,10 @@
import unittest
import urllib
-import ZConfig
+import ZConfigParser
-from ZConfig.loader import ConfigLoader
-from ZConfig.url import urljoin
+from ZConfigParser.loader import ConfigLoader
+from ZConfigParser.url import urljoin
try:
@@ -45,13 +45,13 @@
def load_schema(self, relurl):
self.url = urljoin(CONFIG_BASE, relurl)
- self.schema = ZConfig.loadSchema(self.url)
+ self.schema = ZConfigParser.loadSchema(self.url)
self.assert_(self.schema.issection())
return self.schema
def load_schema_text(self, text, url=None):
sio = StringIO.StringIO(text)
- self.schema = ZConfig.loadSchemaFile(sio, url)
+ self.schema = ZConfigParser.loadSchemaFile(sio, url)
return self.schema
def load_config(self, schema, conf_url, num_handlers=0):
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_cfgimports.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_cfgimports.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_cfgimports.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -20,36 +20,36 @@
from StringIO import StringIO
-import ZConfig
-import ZConfig.tests.support
+import ZConfigParser
+import ZConfigParser.tests.support
-class TestImportFromConfiguration(ZConfig.tests.support.TestBase):
+class TestImportFromConfiguration(ZConfigParser.tests.support.TestBase):
def test_simple_import(self):
schema = self.load_schema_text("<schema/>")
loader = self.create_config_loader(schema)
config, _ = loader.loadFile(
- StringIO("%import ZConfig.tests.library.widget\n"))
+ StringIO("%import ZConfigParser.tests.library.widget\n"))
# make sure we now have a "private" schema object; the only
# way to get it is from the loader itself
self.assert_(schema is not loader.schema)
# make sure component types are only found on the private schema:
loader.schema.gettype("widget-b")
- self.assertRaises(ZConfig.SchemaError, schema.gettype, "widget-b")
+ self.assertRaises(ZConfigParser.SchemaError, schema.gettype, "widget-b")
def test_repeated_import(self):
schema = self.load_schema_text("<schema/>")
loader = self.create_config_loader(schema)
config, _ = loader.loadFile(
- StringIO("%import ZConfig.tests.library.widget\n"
- "%import ZConfig.tests.library.widget\n"))
+ StringIO("%import ZConfigParser.tests.library.widget\n"
+ "%import ZConfigParser.tests.library.widget\n"))
def test_missing_import(self):
schema = self.load_schema_text("<schema/>")
loader = self.create_config_loader(schema)
- self.assertRaises(ZConfig.SchemaError, loader.loadFile,
- StringIO("%import ZConfig.tests.missing\n"))
+ self.assertRaises(ZConfigParser.SchemaError, loader.loadFile,
+ StringIO("%import ZConfigParser.tests.missing\n"))
def test_suite():
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_cmdline.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_cmdline.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_cmdline.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -16,10 +16,10 @@
import unittest
-import ZConfig
+import ZConfigParser
-from ZConfig.cmdline import ExtendedConfigLoader
-from ZConfig.tests.support import TestBase
+from ZConfigParser.cmdline import ExtendedConfigLoader
+from ZConfigParser.tests.support import TestBase
class CommandLineTest(TestBase):
@@ -117,19 +117,19 @@
def test_unknown_key(self):
self.clopts = [("foo=bar", None)]
schema = self.get_simple_schema()
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
self.load_config_text, schema, "")
def test_too_many_keys(self):
self.clopts = [("k1=v1", None), ("k1=v2", None)]
schema = self.get_simple_schema()
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
self.load_config_text, schema, "")
def test_bad_datatype(self):
self.clopts = [("k2=42.0", None)]
schema = self.get_simple_schema()
- self.assertRaises(ZConfig.DataConversionError,
+ self.assertRaises(ZConfigParser.DataConversionError,
self.load_config_text, schema, "")
def test_without_clopts(self):
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_config.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_config.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_config.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -18,9 +18,9 @@
import tempfile
import unittest
-import ZConfig
+import ZConfigParser
-from ZConfig.tests.support import CONFIG_BASE
+from ZConfigParser.tests.support import CONFIG_BASE
class ConfigurationTestCase(unittest.TestCase):
@@ -29,13 +29,13 @@
def get_schema(self):
if self.schema is None:
- ConfigurationTestCase.schema = ZConfig.loadSchema(
+ ConfigurationTestCase.schema = ZConfigParser.loadSchema(
CONFIG_BASE + "simple.xml")
return self.schema
def load(self, relurl, context=None):
url = CONFIG_BASE + relurl
- self.conf, self.handlers = ZConfig.loadConfig(self.get_schema(), url)
+ self.conf, self.handlers = ZConfigParser.loadConfig(self.get_schema(), url)
conf = self.conf
#self.assertEqual(conf.url, url)
self.assert_(conf.getSectionName() is None)
@@ -49,7 +49,7 @@
def loadfile(self, file):
schema = self.get_schema()
- self.conf, self.handlers = ZConfig.loadConfigFile(schema, file)
+ self.conf, self.handlers = ZConfigParser.loadConfigFile(schema, file)
return self.conf
def check_simple_gets(self, conf):
@@ -74,7 +74,7 @@
self.check_simple_gets(conf)
def test_type_errors(self):
- Error = ZConfig.DataConversionError
+ Error = ZConfigParser.DataConversionError
raises = self.assertRaises
raises(Error, self.loadtext, "int-var true")
raises(Error, self.loadtext, "float-var true")
@@ -84,7 +84,7 @@
raises(Error, self.loadtext, "true-var-1 -1")
def test_simple_sections(self):
- self.schema = ZConfig.loadSchema(CONFIG_BASE + "simplesections.xml")
+ self.schema = ZConfigParser.loadSchema(CONFIG_BASE + "simplesections.xml")
conf = self.load("simplesections.conf")
self.assertEqual(conf.var, "foo")
# check each interleaved position between sections
@@ -109,7 +109,7 @@
self.assertEqual(conf.var4, "value")
def test_includes_with_defines(self):
- self.schema = ZConfig.loadSchemaFile(StringIO.StringIO("""\
+ self.schema = ZConfigParser.loadSchemaFile(StringIO.StringIO("""\
<schema>
<key name='refinner' />
<key name='refouter' />
@@ -128,15 +128,15 @@
self.assertEqual(conf.getwords, "abc two words def")
def test_define_errors(self):
- self.assertRaises(ZConfig.ConfigurationSyntaxError,
+ self.assertRaises(ZConfigParser.ConfigurationSyntaxError,
self.loadtext, "%define\n")
- self.assertRaises(ZConfig.ConfigurationSyntaxError,
+ self.assertRaises(ZConfigParser.ConfigurationSyntaxError,
self.loadtext, "%define abc-def\n")
- self.assertRaises(ZConfig.ConfigurationSyntaxError,
+ self.assertRaises(ZConfigParser.ConfigurationSyntaxError,
self.loadtext, "%define a value\n%define a value\n")
def test_fragment_ident_disallowed(self):
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
self.load, "simplesections.conf#another")
def test_load_from_fileobj(self):
@@ -172,7 +172,7 @@
def check_load_from_path(self, path):
schema = self.get_schema()
- ZConfig.loadConfig(schema, path)
+ ZConfigParser.loadConfig(schema, path)
def test_suite():
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_cookbook.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_cookbook.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_cookbook.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -14,15 +14,15 @@
"""Tests of examples from the online cookbook, so we don't break them
down the road. Unless we really mean to.
-The ZConfig Cookbook is available online at:
+The ZConfigParser Cookbook is available online at:
- http://dev.zope.org/Zope3/ZConfig
+ http://dev.zope.org/Zope3/ZConfigParser
"""
import unittest
-from ZConfig.tests.support import TestBase
+from ZConfigParser.tests.support import TestBase
def basic_key_mapping_password_to_passwd(key):
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_datatypes.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_datatypes.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_datatypes.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -11,7 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Tests of standard ZConfig datatypes."""
+"""Tests of standard ZConfigParser datatypes."""
import os
import sys
@@ -21,7 +21,7 @@
import tempfile
import unittest
-import ZConfig.datatypes
+import ZConfigParser.datatypes
try:
here = __file__
@@ -39,7 +39,7 @@
class DatatypeTestCase(unittest.TestCase):
- types = ZConfig.datatypes.Registry()
+ types = ZConfigParser.datatypes.Registry()
def test_datatype_basickey(self):
convert = self.types.get("basic-key")
@@ -181,7 +181,7 @@
def test_datatype_inet_address(self):
convert = self.types.get("inet-address")
eq = self.assertEqual
- defhost = ZConfig.datatypes.DEFAULT_HOST
+ defhost = ZConfigParser.datatypes.DEFAULT_HOST
eq(convert("Host.Example.Com:80"), ("host.example.com", 80))
eq(convert(":80"), (defhost, 80))
eq(convert("80"), (defhost, 80))
@@ -258,7 +258,7 @@
convert = self.types.get("socket-address")
eq = self.assertEqual
AF_INET = socket.AF_INET
- defhost = ZConfig.datatypes.DEFAULT_HOST
+ defhost = ZConfigParser.datatypes.DEFAULT_HOST
def check(value, family, address, self=self, convert=convert):
a = convert(value)
@@ -385,7 +385,7 @@
f = open(fn, "w")
f.write(TEST_DATATYPE_SOURCE)
f.close()
- registry = ZConfig.datatypes.Registry()
+ registry = ZConfigParser.datatypes.Registry()
# we really want the temp area to override everything else:
sys.path.insert(0, tmpdir)
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_loader.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_loader.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_loader.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -11,7 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Tests of ZConfig.loader classes and helper functions."""
+"""Tests of ZConfigParser.loader classes and helper functions."""
import os.path
import sys
@@ -21,11 +21,11 @@
from StringIO import StringIO
-import ZConfig
-import ZConfig.loader
-import ZConfig.url
+import ZConfigParser
+import ZConfigParser.loader
+import ZConfigParser.url
-from ZConfig.tests.support import CONFIG_BASE, TestBase
+from ZConfigParser.tests.support import CONFIG_BASE, TestBase
try:
@@ -40,55 +40,55 @@
class LoaderTestCase(TestBase):
def test_schema_caching(self):
- loader = ZConfig.loader.SchemaLoader()
- url = ZConfig.url.urljoin(CONFIG_BASE, "simple.xml")
+ loader = ZConfigParser.loader.SchemaLoader()
+ url = ZConfigParser.url.urljoin(CONFIG_BASE, "simple.xml")
schema1 = loader.loadURL(url)
schema2 = loader.loadURL(url)
self.assert_(schema1 is schema2)
def test_simple_import_with_cache(self):
- loader = ZConfig.loader.SchemaLoader()
- url1 = ZConfig.url.urljoin(CONFIG_BASE, "library.xml")
+ loader = ZConfigParser.loader.SchemaLoader()
+ url1 = ZConfigParser.url.urljoin(CONFIG_BASE, "library.xml")
schema1 = loader.loadURL(url1)
sio = StringIO("<schema>"
" <import src='library.xml'/>"
" <section type='type-a' name='section'/>"
"</schema>")
- url2 = ZConfig.url.urljoin(CONFIG_BASE, "stringio")
+ url2 = ZConfigParser.url.urljoin(CONFIG_BASE, "stringio")
schema2 = loader.loadFile(sio, url2)
self.assert_(schema1.gettype("type-a") is schema2.gettype("type-a"))
def test_simple_import_using_prefix(self):
self.load_schema_text("""\
- <schema prefix='ZConfig.tests.library'>
+ <schema prefix='ZConfigParser.tests.library'>
<import package='.thing'/>
</schema>
""")
def test_import_errors(self):
# must specify exactly one of package or src
- self.assertRaises(ZConfig.SchemaError, ZConfig.loadSchemaFile,
+ self.assertRaises(ZConfigParser.SchemaError, ZConfigParser.loadSchemaFile,
StringIO("<schema><import/></schema>"))
- self.assertRaises(ZConfig.SchemaError, ZConfig.loadSchemaFile,
+ self.assertRaises(ZConfigParser.SchemaError, ZConfigParser.loadSchemaFile,
StringIO("<schema>"
" <import src='library.xml'"
- " package='ZConfig'/>"
+ " package='ZConfigParser'/>"
"</schema>"))
# cannot specify src and file
- self.assertRaises(ZConfig.SchemaError, ZConfig.loadSchemaFile,
+ self.assertRaises(ZConfigParser.SchemaError, ZConfigParser.loadSchemaFile,
StringIO("<schema>"
" <import src='library.xml'"
" file='other.xml'/>"
"</schema>"))
# cannot specify module as package
sio = StringIO("<schema>"
- " <import package='ZConfig.tests.test_loader'/>"
+ " <import package='ZConfigParser.tests.test_loader'/>"
"</schema>")
try:
- ZConfig.loadSchemaFile(sio)
- except ZConfig.SchemaResourceError, e:
+ ZConfigParser.loadSchemaFile(sio)
+ except ZConfigParser.SchemaResourceError, e:
self.assertEqual(e.filename, "component.xml")
- self.assertEqual(e.package, "ZConfig.tests.test_loader")
+ self.assertEqual(e.package, "ZConfigParser.tests.test_loader")
self.assert_(e.path is None)
# make sure the str() doesn't raise an unexpected exception
str(e)
@@ -96,42 +96,42 @@
self.fail("expected SchemaResourceError")
def test_import_from_package(self):
- loader = ZConfig.loader.SchemaLoader()
+ loader = ZConfigParser.loader.SchemaLoader()
sio = StringIO("<schema>"
- " <import package='ZConfig.tests.library.widget'/>"
+ " <import package='ZConfigParser.tests.library.widget'/>"
"</schema>")
schema = loader.loadFile(sio)
self.assert_(schema.gettype("widget-a") is not None)
def test_import_from_package_with_file(self):
- loader = ZConfig.loader.SchemaLoader()
+ loader = ZConfigParser.loader.SchemaLoader()
sio = StringIO("<schema>"
- " <import package='ZConfig.tests.library.widget'"
+ " <import package='ZConfigParser.tests.library.widget'"
" file='extra.xml' />"
"</schema>")
schema = loader.loadFile(sio)
self.assert_(schema.gettype("extra-type") is not None)
def test_import_from_package_extra_directory(self):
- loader = ZConfig.loader.SchemaLoader()
+ loader = ZConfigParser.loader.SchemaLoader()
sio = StringIO("<schema>"
- " <import package='ZConfig.tests.library.thing'"
+ " <import package='ZConfigParser.tests.library.thing'"
" file='extras.xml' />"
"</schema>")
schema = loader.loadFile(sio)
self.assert_(schema.gettype("extra-thing") is not None)
def test_import_from_package_with_missing_file(self):
- loader = ZConfig.loader.SchemaLoader()
+ loader = ZConfigParser.loader.SchemaLoader()
sio = StringIO("<schema>"
- " <import package='ZConfig.tests.library.widget'"
+ " <import package='ZConfigParser.tests.library.widget'"
" file='notthere.xml' />"
"</schema>")
try:
loader.loadFile(sio)
- except ZConfig.SchemaResourceError, e:
+ except ZConfigParser.SchemaResourceError, e:
self.assertEqual(e.filename, "notthere.xml")
- self.assertEqual(e.package, "ZConfig.tests.library.widget")
+ self.assertEqual(e.package, "ZConfigParser.tests.library.widget")
self.assert_(e.path)
# make sure the str() doesn't raise an unexpected exception
str(e)
@@ -139,18 +139,18 @@
self.fail("expected SchemaResourceError")
def test_import_from_package_with_directory_file(self):
- loader = ZConfig.loader.SchemaLoader()
+ loader = ZConfigParser.loader.SchemaLoader()
sio = StringIO("<schema>"
- " <import package='ZConfig.tests.library.widget'"
+ " <import package='ZConfigParser.tests.library.widget'"
" file='really/notthere.xml' />"
"</schema>")
- self.assertRaises(ZConfig.SchemaError, loader.loadFile, sio)
+ self.assertRaises(ZConfigParser.SchemaError, loader.loadFile, sio)
def test_import_two_components_one_package(self):
- loader = ZConfig.loader.SchemaLoader()
+ loader = ZConfigParser.loader.SchemaLoader()
sio = StringIO("<schema>"
- " <import package='ZConfig.tests.library.widget' />"
- " <import package='ZConfig.tests.library.widget'"
+ " <import package='ZConfigParser.tests.library.widget' />"
+ " <import package='ZConfigParser.tests.library.widget'"
" file='extra.xml' />"
"</schema>")
schema = loader.loadFile(sio)
@@ -162,10 +162,10 @@
# This is most likely to occur when the component is imported
# from each of two other components, or from the top-level
# schema and a component.
- loader = ZConfig.loader.SchemaLoader()
+ loader = ZConfigParser.loader.SchemaLoader()
sio = StringIO("<schema>"
- " <import package='ZConfig.tests.library.widget' />"
- " <import package='ZConfig.tests.library.widget' />"
+ " <import package='ZConfigParser.tests.library.widget' />"
+ " <import package='ZConfigParser.tests.library.widget' />"
"</schema>")
schema = loader.loadFile(sio)
schema.gettype("widget-a")
@@ -173,13 +173,13 @@
def test_import_component_twice_2(self):
# Make sure we can import a component from a config file even
# if it has already been imported from the schema.
- loader = ZConfig.loader.SchemaLoader()
+ loader = ZConfigParser.loader.SchemaLoader()
sio = StringIO("<schema>"
- " <import package='ZConfig.tests.library.widget' />"
+ " <import package='ZConfigParser.tests.library.widget' />"
"</schema>")
schema = loader.loadFile(sio)
- loader = ZConfig.loader.ConfigLoader(schema)
- sio = StringIO("%import ZConfig.tests.library.widget")
+ loader = ZConfigParser.loader.ConfigLoader(schema)
+ sio = StringIO("%import ZConfigParser.tests.library.widget")
loader.loadFile(sio)
def test_urlsplit_urlunsplit(self):
@@ -201,28 +201,28 @@
('file', '', '/tmp/junk.txt', '', '', ''),
('file', '', '/tmp/junk.txt', '', '')),
]:
- result = ZConfig.url.urlsplit(url)
+ result = ZConfigParser.url.urlsplit(url)
self.assertEqual(result, split)
- result2 = ZConfig.url.urlunsplit(result)
+ result2 = ZConfigParser.url.urlunsplit(result)
self.assertEqual(result2, url)
def test_file_url_normalization(self):
self.assertEqual(
- ZConfig.url.urlnormalize("file:/abc/def"),
+ ZConfigParser.url.urlnormalize("file:/abc/def"),
"file:///abc/def")
self.assertEqual(
- ZConfig.url.urlunsplit(("file", "", "/abc/def", "", "")),
+ ZConfigParser.url.urlunsplit(("file", "", "/abc/def", "", "")),
"file:///abc/def")
self.assertEqual(
- ZConfig.url.urljoin("file:/abc/", "def"),
+ ZConfigParser.url.urljoin("file:/abc/", "def"),
"file:///abc/def")
self.assertEqual(
- ZConfig.url.urldefrag("file:/abc/def#frag"),
+ ZConfigParser.url.urldefrag("file:/abc/def#frag"),
("file:///abc/def", "frag"))
def test_isPath(self):
assert_ = self.assert_
- isPath = ZConfig.loader.BaseLoader().isPath
+ isPath = ZConfigParser.loader.BaseLoader().isPath
assert_(isPath("abc"))
assert_(isPath("abc/def"))
assert_(isPath("/abc"))
@@ -239,8 +239,8 @@
class TestNonExistentResources(unittest.TestCase):
# XXX Not sure if this is the best approach for these. These
- # tests make sure that the error reported by ZConfig for missing
- # resources is handled in a consistent way. Since ZConfig uses
+ # tests make sure that the error reported by ZConfigParser for missing
+ # resources is handled in a consistent way. Since ZConfigParser uses
# urllib2.urlopen() for opening all resources, what we do is
# replace that function with one that always raises an exception.
# Since urllib2.urlopen() can raise either IOError or OSError
@@ -268,19 +268,19 @@
def check_nonexistent_file(self):
fn = tempfile.mktemp()
- schema = ZConfig.loadSchemaFile(StringIO("<schema/>"))
- self.assertRaises(ZConfig.ConfigurationError,
- ZConfig.loadSchema, fn)
- self.assertRaises(ZConfig.ConfigurationError,
- ZConfig.loadConfig, schema, fn)
- self.assertRaises(ZConfig.ConfigurationError,
- ZConfig.loadConfigFile, schema,
+ schema = ZConfigParser.loadSchemaFile(StringIO("<schema/>"))
+ self.assertRaises(ZConfigParser.ConfigurationError,
+ ZConfigParser.loadSchema, fn)
+ self.assertRaises(ZConfigParser.ConfigurationError,
+ ZConfigParser.loadConfig, schema, fn)
+ self.assertRaises(ZConfigParser.ConfigurationError,
+ ZConfigParser.loadConfigFile, schema,
StringIO("%include " + fn))
- self.assertRaises(ZConfig.ConfigurationError,
- ZConfig.loadSchema,
+ self.assertRaises(ZConfigParser.ConfigurationError,
+ ZConfigParser.loadSchema,
"http://www.zope.org/no-such-document/")
- self.assertRaises(ZConfig.ConfigurationError,
- ZConfig.loadConfig, schema,
+ self.assertRaises(ZConfigParser.ConfigurationError,
+ ZConfigParser.loadConfig, schema,
"http://www.zope.org/no-such-document/")
@@ -306,7 +306,7 @@
/>
</schema>
''')
- schema = ZConfig.loadSchemaFile(sio)
+ schema = ZConfigParser.loadSchemaFile(sio)
t = schema.gettype("sample")
self.failIf(t.isabstract())
@@ -320,14 +320,14 @@
/>
</schema>
''')
- schema = ZConfig.loadSchemaFile(sio)
+ schema = ZConfigParser.loadSchemaFile(sio)
sio = StringIO('''
%import foo.sample
<sample>
data value
</sample>
''')
- config, _ = ZConfig.loadConfigFile(schema, sio)
+ config, _ = ZConfigParser.loadConfigFile(schema, sio)
self.assertEqual(config.something.data, "| value |")
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_schema.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_schema.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_schema.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -11,13 +11,13 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Tests of ZConfig schemas."""
+"""Tests of ZConfigParser schemas."""
import unittest
-import ZConfig
+import ZConfigParser
-from ZConfig.tests.support import TestBase, CONFIG_BASE
+from ZConfigParser.tests.support import TestBase, CONFIG_BASE
def uppercase(value):
@@ -48,7 +48,7 @@
self.assertEqual(len(schema), 0)
self.assertRaises(IndexError,
lambda schema=schema: schema[0])
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
schema.getinfo, "foo")
def test_simple(self):
@@ -221,7 +221,7 @@
<multikey name='k' required='yes'/>
</schema>
""")
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
self.load_config_text, schema, "")
def test_multisection_required(self):
@@ -231,7 +231,7 @@
<multisection name='*' attribute='s' type='s' required='yes'/>
</schema>
""")
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
self.load_config_text, schema, "")
def test_key_required_but_missing(self):
@@ -240,7 +240,7 @@
<key name='k' required='yes'/>
</schema>
""")
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
self.load_config_text, schema, "")
def test_section_required_but_missing(self):
@@ -250,12 +250,12 @@
<section name='k' type='k' required='yes'/>
</schema>
""")
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
self.load_config_text, schema, "")
def test_key_default_element(self):
self.assertRaises(
- ZConfig.SchemaError, self.load_schema_text, """\
+ ZConfigParser.SchemaError, self.load_schema_text, """\
<schema>
<key name='name'>
<default>text</default>
@@ -276,9 +276,9 @@
""", num_handlers=2)
self.assertEqual(get_section_attributes(conf),
["a", "b"])
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
self.handlers, {'abc': id, 'ABC': id, 'def': id})
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
self.handlers, {})
def test_handler_ordering(self):
@@ -315,7 +315,7 @@
<section name='a' type='nesting'/>
</schema>
""")
- self.assertRaises(ZConfig.ConfigurationError, self.load_config_text,
+ self.assertRaises(ZConfigParser.ConfigurationError, self.load_config_text,
schema, """\
<sect a/>
<sect a/>
@@ -327,7 +327,7 @@
""")
def test_disallowed_duplicate_attribute(self):
- self.assertRaises(ZConfig.SchemaError, self.load_schema_text, """\
+ self.assertRaises(ZConfigParser.SchemaError, self.load_schema_text, """\
<schema>
<key name='a'/>
<key name='b' attribute='a'/>
@@ -335,7 +335,7 @@
""")
def test_unknown_datatype_name(self):
- self.assertRaises(ZConfig.SchemaError,
+ self.assertRaises(ZConfigParser.SchemaError,
self.load_schema_text, "<schema datatype='foobar'/>")
def test_load_abstracttype(self):
@@ -362,7 +362,7 @@
t2 = schema.gettype("t2")
self.assert_(not t2.isabstract())
self.assert_(t.getsubtype("t2") is t2)
- self.assertRaises(ZConfig.ConfigurationError, t.getsubtype, "group")
+ self.assertRaises(ZConfigParser.ConfigurationError, t.getsubtype, "group")
self.assert_(t1 is not t2)
# try loading a config that relies on this schema
conf = self.load_config_text(schema, """\
@@ -408,13 +408,13 @@
def test_abstracttype_extension_errors(self):
# specifying a non-existant abstracttype
- self.assertRaises(ZConfig.SchemaError, self.load_schema_text, """\
+ self.assertRaises(ZConfigParser.SchemaError, self.load_schema_text, """\
<schema>
<sectiontype name='s' implements='group'/>
</schema>
""")
# specifying something that isn't an abstracttype
- self.assertRaises(ZConfig.SchemaError, self.load_schema_text, """\
+ self.assertRaises(ZConfigParser.SchemaError, self.load_schema_text, """\
<schema>
<sectiontype name='t1'/>
<sectiontype name='t2' implements='t1'/>
@@ -490,7 +490,7 @@
'b': ['value-b']})
def test_arbitrary_multikey_with_unkeyed_default(self):
- self.assertRaises(ZConfig.SchemaError,
+ self.assertRaises(ZConfigParser.SchemaError,
self.load_schema_text, """\
<schema>
<multikey name='+' attribute='keymap'>
@@ -512,7 +512,7 @@
self.assertEqual(conf.keymap, {'a': 'value-a', 'b': 'value-b'})
def test_arbitrary_key_with_unkeyed_default(self):
- self.assertRaises(ZConfig.SchemaError,
+ self.assertRaises(ZConfigParser.SchemaError,
self.load_schema_text, """\
<schema>
<key name='+' attribute='keymap'>
@@ -546,11 +546,11 @@
<key name='+' required='yes' attribute='keymap' />
</schema>
""")
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
self.load_config_text, schema, "# empty config file")
def test_arbitrary_key_bad_schema(self):
- self.assertRaises(ZConfig.SchemaError, self.load_schema_text, """\
+ self.assertRaises(ZConfigParser.SchemaError, self.load_schema_text, """\
<schema>
<key name='+' attribute='attr1'/>
<key name='+' attribute='attr2'/>
@@ -633,7 +633,7 @@
self.assertEqual(conf.attr.getSectionName(), "name")
# if we omit the name, it's an error
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
self.load_config_text, schema, "<sect/>")
def test_nested_abstract_sectiontype(self):
@@ -680,7 +680,7 @@
"""
def check(thing, self=self, template=template):
text = template % thing
- self.assertRaises(ZConfig.SchemaError,
+ self.assertRaises(ZConfigParser.SchemaError,
self.load_schema_text, text)
check("<key name='a' attribute='getSection'/>")
@@ -735,10 +735,10 @@
def get_data_conversion_error(self, schema, src, url):
try:
self.load_config_text(schema, src, url=url)
- except ZConfig.DataConversionError, e:
+ except ZConfigParser.DataConversionError, e:
return e
else:
- self.fail("expected ZConfig.DataConversionError")
+ self.fail("expected ZConfigParser.DataConversionError")
def test_numeric_section_name(self):
schema = self.load_schema_text("""\
@@ -776,7 +776,7 @@
def test_sectiontype_extension_errors(self):
# cannot override key from base
- self.assertRaises(ZConfig.SchemaError, self.load_schema_text, """\
+ self.assertRaises(ZConfigParser.SchemaError, self.load_schema_text, """\
<schema>
<sectiontype name='t1'>
<key name='k1'/>
@@ -787,13 +787,13 @@
</schema>
""")
# cannot extend non-existing section
- self.assertRaises(ZConfig.SchemaError, self.load_schema_text, """\
+ self.assertRaises(ZConfigParser.SchemaError, self.load_schema_text, """\
<schema>
<sectiontype name='t2' extends='t1'/>
</schema>
""")
# cannot extend abstract type
- self.assertRaises(ZConfig.SchemaError, self.load_schema_text, """\
+ self.assertRaises(ZConfigParser.SchemaError, self.load_schema_text, """\
<schema>
<abstracttype name='t1'/>
<sectiontype name='t2' extends='t1'/>
@@ -870,7 +870,7 @@
self.assertEqual(items, [("bar", "24"), ("foo", "42")])
def test_duplicate_default_key_checked_in_schema(self):
- self.assertRaises(ZConfig.SchemaError,
+ self.assertRaises(ZConfigParser.SchemaError,
self.load_schema_text, """\
<schema>
<sectiontype name='sect'>
@@ -887,7 +887,7 @@
# If the default values associated with a <key name="+"> can't
# be supported by a new keytype for a derived sectiontype, an
# error should be indicated.
- self.assertRaises(ZConfig.SchemaError,
+ self.assertRaises(ZConfigParser.SchemaError,
self.load_schema_text, """\
<schema>
<sectiontype name='base' keytype='identifier'>
@@ -937,7 +937,7 @@
def test_sectiontype_inherited_datatype(self):
schema = self.load_schema_text("""\
- <schema prefix='ZConfig.tests.test_schema'>
+ <schema prefix='ZConfigParser.tests.test_schema'>
<sectiontype name='base' datatype='.get_foo'>
<key name="foo"/>
</sectiontype>
@@ -968,7 +968,7 @@
self.assertEqual(L, [("host.example.com", "127.0.0.1"),
("www.example.org", "127.0.0.2")])
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
self.load_config_text, schema, "abc. 127.0.0.1")
def test_keytype_identifier(self):
@@ -985,11 +985,11 @@
self.assertEqual(conf.Foo, "Foo-value")
self.assertEqual(get_section_attributes(conf), ["Foo", "foo"])
# key mis-match based on case:
- self.assertRaises(ZConfig.ConfigurationError,
+ self.assertRaises(ZConfigParser.ConfigurationError,
self.load_config_text, schema, "FOO frob\n")
# attribute names conflict, since the keytype isn't used to
# generate attribute names
- self.assertRaises(ZConfig.SchemaError,
+ self.assertRaises(ZConfigParser.SchemaError,
self.load_schema_text, """\
<schema keytype='identifier'>
<key name='foo'/>
@@ -1009,7 +1009,7 @@
self._verifySimpleConf(self.load_config(schema, "simple.conf"))
def test_extends_fragment_failure(self):
- self.assertRaises(ZConfig.SchemaError,
+ self.assertRaises(ZConfigParser.SchemaError,
self.load_schema_text,
"<schema extends='%s/library.xml#foo'/>" % CONFIG_BASE)
@@ -1063,19 +1063,19 @@
""" % (CONFIG_BASE, CONFIG_BASE, __name__))
def test_multi_extends_datatype_conflict(self):
- self.assertRaises(ZConfig.SchemaError,
+ self.assertRaises(ZConfigParser.SchemaError,
self.load_schema_text, """\
<schema extends='%s/base-datatype1.xml %s/base-datatype2.xml'/>
""" % (CONFIG_BASE, CONFIG_BASE))
def test_multi_extends_keytype_conflict(self):
- self.assertRaises(ZConfig.SchemaError,
+ self.assertRaises(ZConfigParser.SchemaError,
self.load_schema_text, """\
<schema extends='%s/base-keytype1.xml %s/base-keytype2.xml'/>
""" % (CONFIG_BASE, CONFIG_BASE))
def test_multiple_descriptions_is_error(self):
- self.assertRaises(ZConfig.SchemaError,
+ self.assertRaises(ZConfigParser.SchemaError,
self.load_schema_text, """\
<schema>
<description> foo </description>
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_schemaless.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_schemaless.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_schemaless.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -12,7 +12,7 @@
#
##############################################################################
"""\
-Test driver for ZConfig.schemaless.
+Test driver for ZConfigParser.schemaless.
"""
__docformat__ = "reStructuredText"
@@ -24,4 +24,4 @@
def test_suite():
- return doctest.DocFileSuite("schemaless.txt", package="ZConfig")
+ return doctest.DocFileSuite("schemaless.txt", package="ZConfigParser")
Modified: Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_subst.py
===================================================================
--- Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_subst.py 2009-04-06 07:21:13 UTC (rev 98907)
+++ Sandbox/ulif/ZConfigParser/ZConfigParser/tests/test_subst.py 2009-04-06 07:49:37 UTC (rev 98908)
@@ -18,8 +18,8 @@
import unittest
-from ZConfig import SubstitutionReplacementError, SubstitutionSyntaxError
-from ZConfig.substitution import isname, substitute
+from ZConfigParser import SubstitutionReplacementError, SubstitutionSyntaxError
+from ZConfigParser.substitution import isname, substitute
class SubstitutionTestCase(unittest.TestCase):
More information about the Checkins
mailing list