← Back to team overview

configglue team mailing list archive

[Merge] lp:~ricardokirkner/configglue/refactor-options into lp:configglue

 

Ricardo Kirkner has proposed merging lp:~ricardokirkner/configglue/refactor-options into lp:configglue with lp:~ricardokirkner/configglue/inner-classes as a prerequisite.

Requested reviews:
  Configglue developers (configglue)

For more details, see:
https://code.launchpad.net/~ricardokirkner/configglue/refactor-options/+merge/61719

Some renames:

- ConfigSection -> Section
- ConfigOption -> Option
- LinesConfigOption -> ListOption
- <Foo>ConfigOption -> <Foo>Option

Also moved the tests package into the configglue namespace
-- 
https://code.launchpad.net/~ricardokirkner/configglue/refactor-options/+merge/61719
Your team Configglue developers is requested to review the proposed merge of lp:~ricardokirkner/configglue/refactor-options into lp:configglue.
=== modified file 'configglue/inischema/glue.py'
--- configglue/inischema/glue.py	2011-03-06 17:28:14 +0000
+++ configglue/inischema/glue.py	2011-05-20 09:17:23 +0000
@@ -27,12 +27,12 @@
 from configglue.pyschema.glue import schemaconfigglue
 from configglue.pyschema.parser import SchemaConfigParser
 from configglue.pyschema.schema import (
-    BoolConfigOption,
-    ConfigSection,
-    IntConfigOption,
-    LinesConfigOption,
+    BoolOption,
+    Section,
+    IntOption,
+    ListOption,
     Schema,
-    StringConfigOption,
+    StringOption,
 )
 
 
@@ -58,10 +58,10 @@
     p.readfp(fd)
     p.parse_all()
 
-    parser2option = {'unicode': StringConfigOption,
-                     'int': IntConfigOption,
-                     'bool': BoolConfigOption,
-                     'lines': LinesConfigOption}
+    parser2option = {'unicode': StringOption,
+                     'int': IntOption,
+                     'bool': BoolOption,
+                     'lines': ListOption}
 
     class MySchema(Schema):
         pass
@@ -70,7 +70,7 @@
         if section_name == '__main__':
             section = MySchema
         else:
-            section = ConfigSection(name=section_name)
+            section = Section(name=section_name)
             setattr(MySchema, section_name, section)
         for option_name in p.options(section_name):
             option = p.get(section_name, option_name)
@@ -93,9 +93,9 @@
             if option_action is not None:
                 attrs['action'] = option_action
 
-            klass = parser2option.get(parser, StringConfigOption)
+            klass = parser2option.get(parser, StringOption)
             if parser == 'lines':
-                instance = klass(item=StringConfigOption(), **attrs)
+                instance = klass(item=StringOption(), **attrs)
             else:
                 instance = klass(**attrs)
             setattr(section, option_name, instance)

=== modified file 'configglue/pyschema/parser.py'
--- configglue/pyschema/parser.py	2011-05-02 16:23:04 +0000
+++ configglue/pyschema/parser.py	2011-05-20 09:17:23 +0000
@@ -29,7 +29,7 @@
     NoSectionError,
 )
 
-from configglue.pyschema.schema import DictConfigOption
+from configglue.pyschema.schema import DictOption
 
 
 __all__ = [
@@ -204,7 +204,7 @@
         If section is specified, return all options from that section only.
 
         Section is to be specified *by name*, not by
-        passing in real ConfigSection objects.
+        passing in real Section objects.
 
         """
         values = collections.defaultdict(dict)
@@ -327,9 +327,9 @@
                 kwargs = {'parser': self}
 
             # hook to save extra sections
-            is_dict_option = isinstance(option_obj, DictConfigOption)
+            is_dict_option = isinstance(option_obj, DictOption)
             is_dict_lines_option = (hasattr(option_obj, 'item') and
-                isinstance(option_obj.item, DictConfigOption))
+                isinstance(option_obj.item, DictOption))
             is_default_value = unicode(option_obj.default) == value
 
             # avoid adding implicit sections for dict default value

=== modified file 'configglue/pyschema/schema.py'
--- configglue/pyschema/schema.py	2011-05-20 09:17:22 +0000
+++ configglue/pyschema/schema.py	2011-05-20 09:17:23 +0000
@@ -20,15 +20,15 @@
 
 
 __all__ = [
-    'BoolConfigOption',
-    'ConfigOption',
-    'ConfigSection',
-    'DictConfigOption',
-    'IntConfigOption',
-    'LinesConfigOption',
+    'BoolOption',
+    'Option',
+    'Section',
+    'DictOption',
+    'IntOption',
+    'ListOption',
     'Schema',
-    'StringConfigOption',
-    'TupleConfigOption',
+    'StringOption',
+    'TupleOption',
 ]
 
 NO_DEFAULT = object()
@@ -39,9 +39,9 @@
 def get_config_objects(obj):
     objects = []
     for name, obj in getmembers(obj):
-        if isinstance(obj, (ConfigSection, ConfigOption)):
+        if isinstance(obj, (Section, Option)):
             objects.append((name, obj))
-        elif type(obj) == type and issubclass(obj, ConfigSection):
+        elif type(obj) == type and issubclass(obj, Section):
             instance = obj()
             for key, value in get_config_objects(obj):
                 setattr(instance, key, value)
@@ -54,22 +54,22 @@
 
     To define your own configuration schema you should:
      1- Inherit from Schema
-     2- Add ConfigOptions and ConfigSections as class attributes.
+     2- Add Options and Sections as class attributes.
 
     With that your whole configuration schema is defined, and you can now
     load configuration files.
 
-    ConfigOptions that don't go in a ConfigSection will belong in the
+    Options that don't go in a Section will belong in the
     '__main__' section of the configuration files.
 
-    One ConfigOption comes already defined in Schema, 'includes' in the
+    One Option comes already defined in Schema, 'includes' in the
     '__main__' section, that allows configuration files to include other
     configuration files.
 
     """
 
     def __init__(self):
-        self.includes = LinesConfigOption(item=StringConfigOption())
+        self.includes = ListOption(item=StringOption())
         self._sections = {}
         # add section and options to the schema
         for name, item in get_config_objects(self.__class__):
@@ -78,9 +78,9 @@
     def _add_item(self, name, item):
         """Add a top-level item to the schema."""
         item.name = name
-        if isinstance(item, ConfigSection):
+        if isinstance(item, Section):
             self._add_section(name, item)
-        elif isinstance(item, ConfigOption):
+        elif isinstance(item, Option):
             self._add_option(name, item)
         # override class attributes with instance attributes to correctly
         # handle schema inheritance
@@ -95,7 +95,7 @@
 
     def _add_option(self, name, option):
         """Add a top-level option to the schema."""
-        section = self._sections.setdefault('__main__', ConfigSection(name='__main__'))
+        section = self._sections.setdefault('__main__', Section(name='__main__'))
         option.section = section
         setattr(section, name, option)
 
@@ -109,27 +109,27 @@
     def is_valid(self):
         """Return whether the schema has a valid structure."""
         explicit_default_section = isinstance(getattr(self, '__main__', None),
-                                              ConfigSection)
+                                              Section)
         is_valid = not explicit_default_section
         return is_valid
 
     def has_section(self, name):
         """Return whether the schema as a given section."""
-        """Return True if a ConfigSection with the given name is available"""
+        """Return True if a Section with the given name is available"""
         return name in self._sections.keys()
 
     def section(self, name):
-        """Return a ConfigSection by name"""
+        """Return a Section by name"""
         section = self._sections.get(name)
-        assert section is not None, "Invalid ConfigSection name '%s'" % name
+        assert section is not None, "Invalid Section name '%s'" % name
         return section
 
     def sections(self):
-        """Returns the list of available ConfigSections"""
+        """Returns the list of available Sections"""
         return self._sections.values()
 
     def options(self, section=None):
-        """Return all the ConfigOptions within a given section.
+        """Return all the Options within a given section.
 
         If section is omitted, returns all the options in the configuration
         file, flattening out any sections.
@@ -145,18 +145,18 @@
         elif section.name == '__main__':
             class_config_objects = get_config_objects(self.__class__)
             options = [getattr(self, att) for att, _ in class_config_objects
-                           if isinstance(getattr(self, att), ConfigOption)]
+                           if isinstance(getattr(self, att), Option)]
         else:
             options = section.options()
         return options
 
 
-class ConfigSection(object):
+class Section(object):
     """A group of options.
 
-    This class is just a bag you can dump ConfigOptions in.
+    This class is just a bag you can dump Options in.
 
-    After instantiating the Schema, each ConfigSection will know its own
+    After instantiating the Schema, each Section will know its own
     name.
 
     """
@@ -175,30 +175,30 @@
             name = " %s" % self.name
         else:
             name = ''
-        value = "<ConfigSection%s>" % name
+        value = "<Section%s>" % name
         return value
 
     def has_option(self, name):
-        """Return True if a ConfigOption with the given name is available"""
+        """Return True if a Option with the given name is available"""
         opt = getattr(self, name, None)
-        return isinstance(opt, ConfigOption)
+        return isinstance(opt, Option)
 
     def option(self, name):
-        """Return a ConfigOption by name"""
+        """Return a Option by name"""
         opt = getattr(self, name, None)
-        assert opt is not None, "Invalid ConfigOption name '%s'" % name
+        assert opt is not None, "Invalid Option name '%s'" % name
         return opt
 
     def options(self):
-        """Return a list of all available ConfigOptions within this section"""
+        """Return a list of all available Options within this section"""
         return [getattr(self, att) for att in vars(self)
-                if isinstance(getattr(self, att), ConfigOption)]
-
-
-class ConfigOption(object):
+                if isinstance(getattr(self, att), Option)]
+
+
+class Option(object):
     """Base class for Config Options.
 
-    ConfigOptions are never bound to a particular conguration file, and
+    Options are never bound to a particular conguration file, and
     simply describe one particular available option.
 
     They also know how to parse() the content of a config file in to the right
@@ -211,14 +211,14 @@
     argument, parser, that should receive the whole SchemaConfigParser to
     do the parsing.  This is needed for config options that need to look at
     other parts of the config file to be able to carry out their parsing,
-    like DictConfigOptions.
+    like DictOptions.
 
     If self.fatal == True, SchemaConfigParser's parse_all will raise an
     exception if no value for this option is provided in the configuration
     file.  Otherwise, the self.default value will be used if the option is
     omitted.
 
-    In runtime, after instantiating the Schema, each ConfigOption will also
+    In runtime, after instantiating the Schema, each Option will also
     know its own name and to which section it belongs.
 
     """
@@ -267,7 +267,7 @@
             name = " %s" % self.name
         else:
             name = ''
-        value = "<ConfigOption%s%s>" % (name, extra)
+        value = "<Option%s%s>" % (name, extra)
         return value
 
     def _get_default(self):
@@ -278,8 +278,8 @@
         raise NotImplementedError()
 
 
-class BoolConfigOption(ConfigOption):
-    """A ConfigOption that is parsed into a bool"""
+class BoolOption(Option):
+    """A Option that is parsed into a bool"""
 
     def _get_default(self):
         return False
@@ -301,8 +301,8 @@
             raise ValueError("Unable to determine boolosity of %r" % value)
 
 
-class IntConfigOption(ConfigOption):
-    """A ConfigOption that is parsed into an int"""
+class IntOption(Option):
+    """A Option that is parsed into an int"""
 
     def _get_default(self):
         return 0
@@ -319,12 +319,12 @@
         return int(value)
 
 
-class LinesConfigOption(ConfigOption):
-    """A ConfigOption that is parsed into a list of objects
+class ListOption(Option):
+    """A Option that is parsed into a list of objects
 
     All items in the list need to be of the same type.  The 'item' constructor
     argument determines the type of the list items. item should be another
-    child of ConfigOption.
+    child of Option.
 
     self.require_parser will be True if the item provided in turn has
     require_parser == True.
@@ -337,7 +337,7 @@
 
     def __init__(self, name='', item=None, raw=False, default=NO_DEFAULT,
         fatal=False, help='', action='store', remove_duplicates=False):
-        super(LinesConfigOption, self).__init__(name=name, raw=raw,
+        super(ListOption, self).__init__(name=name, raw=raw,
             default=default, fatal=fatal, help=help, action=action)
         self.item = item
         self.require_parser = item.require_parser
@@ -370,8 +370,8 @@
         return items
 
 
-class StringConfigOption(ConfigOption):
-    """A ConfigOption that is parsed into a string.
+class StringOption(Option):
+    """A Option that is parsed into a string.
 
     If null==True, a value of 'None' will be parsed in to None instead of
     just leaving it as the string 'None'.
@@ -381,7 +381,7 @@
     def __init__(self, name='', raw=False, default=NO_DEFAULT, fatal=False,
         null=False, help='', action='store'):
         self.null = null
-        super(StringConfigOption, self).__init__(name=name, raw=raw,
+        super(StringOption, self).__init__(name=name, raw=raw,
             default=default, fatal=fatal, help=help, action=action)
 
     def _get_default(self):
@@ -404,8 +404,8 @@
         return result
 
 
-class TupleConfigOption(ConfigOption):
-    """A ConfigOption that is parsed into a fixed-size tuple of strings.
+class TupleOption(Option):
+    """A Option that is parsed into a fixed-size tuple of strings.
 
     The number of items in the tuple should be specified with the 'length'
     constructor argument.
@@ -414,7 +414,7 @@
 
     def __init__(self, name='', length=0, raw=False, default=NO_DEFAULT,
         fatal=False, help='', action='store'):
-        super(TupleConfigOption, self).__init__(name=name, raw=raw,
+        super(TupleOption, self).__init__(name=name, raw=raw,
             default=default, fatal=fatal, help=help, action=action)
         self.length = length
 
@@ -442,8 +442,8 @@
         return result
 
 
-class DictConfigOption(ConfigOption):
-    """A ConfigOption that is parsed into a dictionary.
+class DictOption(Option):
+    """A Option that is parsed into a dictionary.
 
     In the configuration file you'll need to specify the name of a section,
     and all that section's items will be parsed as a dictionary.
@@ -451,7 +451,7 @@
     The available keys for the dict are specified with the 'spec' constructor
     argument, that should be in turn a dictionary.  spec's keys are the
     available keys for the config file, and spec's values should be
-    ConfigOptions that will be used to parse the values in the config file.
+    Options that will be used to parse the values in the config file.
 
     """
 
@@ -463,11 +463,11 @@
         if spec is None:
             spec = {}
         if item is None:
-            item = StringConfigOption()
+            item = StringOption()
         self.spec = spec
         self.strict = strict
         self.item = item
-        super(DictConfigOption, self).__init__(name=name, raw=raw,
+        super(DictOption, self).__init__(name=name, raw=raw,
             default=default, fatal=fatal, help=help, action=action)
 
     def _get_default(self):
@@ -524,9 +524,9 @@
         sections = []
         for option in parser.options(section):
             option_obj = self.spec.get(option, self.item)
-            is_dict_item = isinstance(option_obj, DictConfigOption)
+            is_dict_item = isinstance(option_obj, DictOption)
             is_dict_lines_item = (hasattr(option_obj, 'item') and
-                isinstance(option_obj.item, DictConfigOption))
+                isinstance(option_obj.item, DictOption))
 
             if is_dict_item:
                 base = option_obj

=== renamed directory 'tests' => 'configglue/tests'
=== modified file 'configglue/tests/pyschema/test_parser.py'
--- tests/pyschema/test_parser.py	2011-05-20 09:17:22 +0000
+++ configglue/tests/pyschema/test_parser.py	2011-05-20 09:17:23 +0000
@@ -41,21 +41,21 @@
     SchemaValidationError,
 )
 from configglue.pyschema.schema import (
-    BoolConfigOption,
-    ConfigSection,
-    DictConfigOption,
-    IntConfigOption,
-    LinesConfigOption,
+    BoolOption,
+    Section,
+    DictOption,
+    IntOption,
+    ListOption,
     Schema,
-    StringConfigOption,
-    TupleConfigOption,
+    StringOption,
+    TupleOption,
 )
 
 
 class TestIncludes(unittest.TestCase):
     def setUp(self):
         class MySchema(Schema):
-            foo = StringConfigOption()
+            foo = StringOption()
         self.schema = MySchema()
         fd, self.name = tempfile.mkstemp(suffix='.cfg')
         os.write(fd, '[__main__]\nfoo=bar\n')
@@ -116,9 +116,9 @@
             return config, folder
 
         class MySchema(Schema):
-            foo = IntConfigOption()
-            bar = IntConfigOption()
-            baz = IntConfigOption()
+            foo = IntOption()
+            bar = IntOption()
+            baz = IntOption()
 
         config, folder = setup_config()
         expected_values = {'__main__': {'foo': 1, 'bar': 2, 'baz': 3}}
@@ -152,9 +152,9 @@
             return config, folder
 
         class MySchema(Schema):
-            foo = IntConfigOption()
-            bar = IntConfigOption()
-            baz = IntConfigOption()
+            foo = IntOption()
+            bar = IntOption()
+            baz = IntOption()
 
         config, folder = setup_config()
         expected_values = {'__main__': {'foo': 4, 'bar': 2, 'baz': 3}}
@@ -176,8 +176,8 @@
 class TestInterpolation(unittest.TestCase):
     def test_basic_interpolate(self):
         class MySchema(Schema):
-            foo = StringConfigOption()
-            bar = BoolConfigOption()
+            foo = StringOption()
+            bar = BoolOption()
         config = StringIO('[__main__]\nbar=%(foo)s\nfoo=True')
         parser = SchemaConfigParser(MySchema())
         parser.readfp(config, 'my.cfg')
@@ -186,8 +186,8 @@
 
     def test_interpolate_missing_option(self):
         class MySchema(Schema):
-            foo = StringConfigOption()
-            bar = BoolConfigOption()
+            foo = StringOption()
+            bar = BoolOption()
 
         section = '__main__'
         option = 'foo'
@@ -199,8 +199,8 @@
 
     def test_interpolate_too_deep(self):
         class MySchema(Schema):
-            foo = StringConfigOption()
-            bar = BoolConfigOption()
+            foo = StringOption()
+            bar = BoolOption()
 
         section = '__main__'
         option = 'foo'
@@ -212,8 +212,8 @@
 
     def test_interpolate_incomplete_format(self):
         class MySchema(Schema):
-            foo = StringConfigOption()
-            bar = BoolConfigOption()
+            foo = StringOption()
+            bar = BoolOption()
 
         section = '__main__'
         option = 'foo'
@@ -225,11 +225,11 @@
 
     def test_interpolate_across_sections(self):
         class MySchema(Schema):
-            class foo(ConfigSection):
-                bar = IntConfigOption()
+            class foo(Section):
+                bar = IntOption()
 
-            class baz(ConfigSection):
-                wham = IntConfigOption()
+            class baz(Section):
+                wham = IntOption()
 
         config = StringIO("[foo]\nbar=%(wham)s\n[baz]\nwham=42")
         parser = SchemaConfigParser(MySchema())
@@ -239,11 +239,11 @@
 
     def test_interpolate_invalid_key(self):
         class MySchema(Schema):
-            class foo(ConfigSection):
-                bar = IntConfigOption()
+            class foo(Section):
+                bar = IntOption()
 
-            class baz(ConfigSection):
-                wham = IntConfigOption()
+            class baz(Section):
+                wham = IntOption()
 
         config = StringIO("[foo]\nbar=%(wham)s\n[baz]\nwham=42")
         parser = SchemaConfigParser(MySchema())
@@ -253,7 +253,7 @@
 
     def test_get_interpolation_keys_string(self):
         class MySchema(Schema):
-            foo = StringConfigOption()
+            foo = StringOption()
         config = StringIO("[__main__]\nfoo=%(bar)s")
         expected = ('%(bar)s', set(['bar']))
 
@@ -264,7 +264,7 @@
 
     def test_get_interpolation_keys_int(self):
         class MySchema(Schema):
-            foo = IntConfigOption()
+            foo = IntOption()
         config = StringIO("[__main__]\nfoo=%(bar)s")
         expected = ('%(bar)s', set(['bar']))
 
@@ -275,7 +275,7 @@
 
     def test_get_interpolation_keys_bool(self):
         class MySchema(Schema):
-            foo = BoolConfigOption()
+            foo = BoolOption()
         config = StringIO("[__main__]\nfoo=%(bar)s")
         expected = ('%(bar)s', set(['bar']))
 
@@ -286,7 +286,7 @@
 
     def test_get_interpolation_keys_tuple(self):
         class MySchema(Schema):
-            foo = TupleConfigOption(2)
+            foo = TupleOption(2)
         config = StringIO("[__main__]\nfoo=%(bar)s,%(baz)s")
         expected = ('%(bar)s,%(baz)s', set(['bar', 'baz']))
 
@@ -297,7 +297,7 @@
 
     def test_get_interpolation_keys_lines(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(item=StringConfigOption())
+            foo = ListOption(item=StringOption())
         config = StringIO("[__main__]\nfoo=%(bar)s\n    %(baz)s")
         expected = ('%(bar)s\n%(baz)s', set(['bar', 'baz']))
 
@@ -308,7 +308,7 @@
 
     def test_get_interpolation_keys_tuple_lines(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(item=TupleConfigOption(2))
+            foo = ListOption(item=TupleOption(2))
         config = StringIO("[__main__]\nfoo=%(bar)s,%(bar)s\n    %(baz)s,%(baz)s")
         expected = ('%(bar)s,%(bar)s\n%(baz)s,%(baz)s',
                     set(['bar', 'baz']))
@@ -320,7 +320,7 @@
 
     def test_get_interpolation_keys_dict(self):
         class MySchema(Schema):
-            foo = DictConfigOption(spec={'a': IntConfigOption()})
+            foo = DictOption(spec={'a': IntOption()})
         config = StringIO("[__noschema__]\nbar=4\n[__main__]\nfoo=mydict\n[mydict]\na=%(bar)s")
         expected = ('mydict', set([]))
 
@@ -331,7 +331,7 @@
 
     def test_interpolate_value_duplicate_key(self):
         class MySchema(Schema):
-            foo = TupleConfigOption(2)
+            foo = TupleOption(2)
         config = StringIO("[__noschema__]\nbar=4\n[__main__]\nfoo=%(bar)s,%(bar)s")
         expected_value = '4,4'
 
@@ -342,7 +342,7 @@
 
     def test_interpolate_value_invalid_key(self):
         class MySchema(Schema):
-            foo = TupleConfigOption(2)
+            foo = TupleOption(2)
         config = StringIO("[other]\nbar=4\n[__main__]\nfoo=%(bar)s,%(bar)s")
         expected_value = None
 
@@ -353,7 +353,7 @@
 
     def test_interpolate_value_no_keys(self):
         class MySchema(Schema):
-            foo = TupleConfigOption(2)
+            foo = TupleOption(2)
         config = StringIO("[__main__]\nfoo=%(bar)s,%(bar)s")
 
         mock_get_interpolation_keys = Mock(return_value=('%(bar)s', None))
@@ -369,7 +369,7 @@
 
     def test_get_with_raw_value(self):
         class MySchema(Schema):
-            foo = StringConfigOption(raw=True)
+            foo = StringOption(raw=True)
         config = StringIO('[__main__]\nfoo=blah%(asd)##$@@dddf2kjhkjs')
         expected_value = 'blah%(asd)##$@@dddf2kjhkjs'
 
@@ -380,7 +380,7 @@
 
     def test_interpolate_parse_dict(self):
         class MySchema(Schema):
-            foo = DictConfigOption(spec={'a': IntConfigOption()})
+            foo = DictOption(spec={'a': IntOption()})
         config = StringIO("[__noschema__]\nbar=4\n[__main__]\nfoo=mydict\n[mydict]\na=%(bar)s")
         expected = {'__main__': {'foo': {'a': 4}}}
 
@@ -393,7 +393,7 @@
 class TestSchemaConfigParser(unittest.TestCase):
     def setUp(self):
         class MySchema(Schema):
-            foo = StringConfigOption()
+            foo = StringOption()
         self.schema = MySchema()
         self.parser = SchemaConfigParser(self.schema)
         self.config = StringIO("[__main__]\nfoo = bar")
@@ -406,7 +406,7 @@
 
     def test_init_invalid_schema(self):
         class MyInvalidSchema(Schema):
-            class __main__(ConfigSection):
+            class __main__(Section):
                 pass
 
         self.assertRaises(SchemaValidationError, SchemaConfigParser,
@@ -434,10 +434,10 @@
 
     def test_items_interpolate(self):
         class MySchema(Schema):
-            foo = StringConfigOption()
+            foo = StringOption()
 
-            class baz(ConfigSection):
-                bar = StringConfigOption()
+            class baz(Section):
+                bar = StringOption()
 
         parser = SchemaConfigParser(MySchema())
         config = StringIO('[__main__]\nfoo=%(bar)s\n[baz]\nbar=42')
@@ -467,11 +467,11 @@
 
     def test_values_many_sections_same_option(self):
         class MySchema(Schema):
-            class foo(ConfigSection):
-                bar = IntConfigOption()
+            class foo(Section):
+                bar = IntOption()
 
-            class baz(ConfigSection):
-                bar = IntConfigOption()
+            class baz(Section):
+                bar = IntOption()
 
         config = StringIO("[foo]\nbar=3\n[baz]\nbar=4")
         expected_values = {'foo': {'bar': 3}, 'baz': {'bar': 4}}
@@ -484,11 +484,11 @@
 
     def test_values_many_sections_different_options(self):
         class MySchema(Schema):
-            class foo(ConfigSection):
-                bar = IntConfigOption()
+            class foo(Section):
+                bar = IntOption()
 
-            class bar(ConfigSection):
-                baz = IntConfigOption()
+            class bar(Section):
+                baz = IntOption()
 
         config = StringIO("[foo]\nbar=3\n[bar]\nbaz=4")
         expected_values = {'foo': {'bar': 3}, 'bar': {'baz': 4}}
@@ -501,8 +501,8 @@
 
     def test_parse_option(self):
         class MyOtherSchema(Schema):
-            class foo(ConfigSection):
-                bar = StringConfigOption()
+            class foo(Section):
+                bar = StringOption()
 
         expected_value = 'baz'
         config = StringIO("[foo]\nbar = baz")
@@ -516,10 +516,10 @@
 
     def test_default_values(self):
         class MySchema(Schema):
-            foo = BoolConfigOption(default=True)
-            class bar(ConfigSection):
-                baz = IntConfigOption()
-                bla = StringConfigOption(default='hello')
+            foo = BoolOption(default=True)
+            class bar(Section):
+                baz = IntOption()
+                bla = StringOption(default='hello')
         schema = MySchema()
         config = StringIO("[bar]\nbaz=123")
         expected_values = {'__main__': {'foo': True},
@@ -536,8 +536,8 @@
 
     def test_fatal_options(self):
         class MySchema(Schema):
-            foo = IntConfigOption(fatal=True)
-            bar = IntConfigOption()
+            foo = IntOption(fatal=True)
+            bar = IntOption()
         schema = MySchema()
         config = StringIO("[__main__]\nfoo=123")
         expected = {'__main__': {'foo': 123, 'bar': 0}}
@@ -552,7 +552,7 @@
 
     def test_extra_sections(self):
         class MySchema(Schema):
-            foo = DictConfigOption(spec={'bar': IntConfigOption()})
+            foo = DictOption(spec={'bar': IntOption()})
 
         config = StringIO("[__main__]\nfoo=mydict\n[mydict]\nbar=1")
         parser = SchemaConfigParser(MySchema())
@@ -565,8 +565,8 @@
 
     def test_multiple_extra_sections(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(
-                item=DictConfigOption(spec={'bar': IntConfigOption()}))
+            foo = ListOption(
+                item=DictOption(spec={'bar': IntOption()}))
 
         config = StringIO('[__main__]\nfoo=d1\n    d2\n    d3\n'
                           '[d1]\nbar=1\n[d2]\nbar=2\n[d3]\nbar=3')
@@ -594,8 +594,8 @@
 
     def test_get_default_from_section(self):
         class MySchema(Schema):
-            class foo(ConfigSection):
-                bar = IntConfigOption()
+            class foo(Section):
+                bar = IntOption()
         config = StringIO("[__main__]\n")
         expected = '0'
 
@@ -616,9 +616,9 @@
 
     def test_multi_file_dict_config(self):
         class MySchema(Schema):
-            foo = DictConfigOption(spec={
-                'bar': IntConfigOption(),
-                'baz': IntConfigOption(),
+            foo = DictOption(spec={
+                'bar': IntOption(),
+                'baz': IntOption(),
             }, strict=True)
         config1 = StringIO('[__main__]\nfoo=mydict\n[mydict]\nbar=1\nbaz=1')
         config2 = StringIO('[mydict]\nbaz=2')
@@ -631,10 +631,10 @@
 
     def test_multi_file_dict_list_config(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(
-                item=DictConfigOption(spec={
-                    'bar': IntConfigOption(),
-                    'baz': IntConfigOption(),
+            foo = ListOption(
+                item=DictOption(spec={
+                    'bar': IntOption(),
+                    'baz': IntOption(),
                 }, strict=True))
 
         config1 = StringIO('[__main__]\nfoo=mydict\n[mydict]\nbar=1\nbaz=1')
@@ -723,8 +723,8 @@
 
     def test_write(self):
         class MySchema(Schema):
-            foo = StringConfigOption()
-            class DEFAULTSECT(ConfigSection):
+            foo = StringOption()
+            class DEFAULTSECT(Section):
                 pass
         parser = SchemaConfigParser(MySchema())
         expected = u"[{0}]\nbaz = 2\n\n[__main__]\nfoo = bar".format(DEFAULTSECT)
@@ -783,8 +783,8 @@
             return files, folder
 
         class MySchema(Schema):
-            foo = StringConfigOption()
-            bar = StringConfigOption()
+            foo = StringOption()
+            bar = StringOption()
 
         self.parser = SchemaConfigParser(MySchema())
 
@@ -812,14 +812,14 @@
 class TestParserIsValid(unittest.TestCase):
     def setUp(self):
         class MySchema(Schema):
-            foo = StringConfigOption()
+            foo = StringOption()
         self.schema = MySchema()
         self.parser = SchemaConfigParser(self.schema)
         self.config = StringIO("[__main__]\nfoo = bar")
 
     def test_basic_is_valid(self):
         class MySchema(Schema):
-            foo = IntConfigOption()
+            foo = IntOption()
 
         schema = MySchema()
         config = StringIO("[__main__]\nfoo = 5")
@@ -830,7 +830,7 @@
 
     def test_basic_is_valid_with_report(self):
         class MySchema(Schema):
-            foo = IntConfigOption()
+            foo = IntOption()
 
         config = StringIO("[__main__]\nfoo=5")
         expected = (True, [])
@@ -841,7 +841,7 @@
 
     def test_basic_is_not_valid(self):
         class MySchema(Schema):
-            foo = IntConfigOption()
+            foo = IntOption()
 
         schema = MySchema()
         config = StringIO("[__main__]\nfoo = 5\nbar = 6")
@@ -852,7 +852,7 @@
 
     def test_basic_is_not_valid_with_report(self):
         class MySchema(Schema):
-            foo = IntConfigOption()
+            foo = IntOption()
 
         config = StringIO("[__main__]\nfoo=5\nbar=6")
         errors = ["Configuration includes invalid options for section '__main__': bar"]
@@ -865,7 +865,7 @@
 
     def test_is_not_valid_parser_error(self):
         class MySchema(Schema):
-            foo = IntConfigOption()
+            foo = IntOption()
 
         def mock_parse_all(self):
             assert False
@@ -901,8 +901,8 @@
 
     def test_missing_fatal_options(self):
         class MySchema(Schema):
-            foo = IntConfigOption()
-            bar = IntConfigOption(fatal=True)
+            foo = IntOption()
+            bar = IntOption(fatal=True)
 
         config = StringIO("[__main__]\nfoo=1")
         parser = SchemaConfigParser(MySchema())
@@ -912,8 +912,8 @@
 
     def test_missing_nonfatal_options(self):
         class MySchema(Schema):
-            foo = IntConfigOption()
-            bar = IntConfigOption(fatal=True)
+            foo = IntOption()
+            bar = IntOption(fatal=True)
 
         config = StringIO("[__main__]\nbar=2")
         parser = SchemaConfigParser(MySchema())
@@ -923,7 +923,7 @@
 
     def test_extra_sections(self):
         class MySchema(Schema):
-            foo = DictConfigOption(spec={'bar': IntConfigOption()})
+            foo = DictOption(spec={'bar': IntOption()})
 
         config = StringIO("[__main__]\nfoo=mydict\n[mydict]\nbar=1")
         parser = SchemaConfigParser(MySchema())
@@ -934,7 +934,7 @@
 
     def test_extra_sections_when_dict_with_nested_dicts(self):
         class MySchema(Schema):
-            foo = DictConfigOption(item=DictConfigOption())
+            foo = DictOption(item=DictOption())
 
         config = StringIO("""
 [__main__]
@@ -954,7 +954,7 @@
 
     def test_extra_sections_with_nested_dicts_strict(self):
         class MySchema(Schema):
-            foo = DictConfigOption(spec={'bar': DictConfigOption()}, strict=True)
+            foo = DictOption(spec={'bar': DictOption()}, strict=True)
 
         config = StringIO("""
 [__main__]
@@ -974,8 +974,8 @@
 
     def test_extra_sections_when_lines_dict_with_nested_dicts(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(
-                item=DictConfigOption(item=DictConfigOption()))
+            foo = ListOption(
+                item=DictOption(item=DictOption()))
 
         config = StringIO("""
 [__main__]
@@ -1003,8 +1003,8 @@
 
     def test_extra_sections_when_dict_with_nested_lines_dicts(self):
         class MySchema(Schema):
-            foo = DictConfigOption(
-                item=LinesConfigOption(item=DictConfigOption()))
+            foo = DictOption(
+                item=ListOption(item=DictOption()))
 
         config = StringIO("""
 [__main__]
@@ -1027,9 +1027,9 @@
 
     def test_extra_sections_when_lines_dict_with_nested_lines_dicts(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(
-                item=DictConfigOption(
-                    item=LinesConfigOption(item=DictConfigOption())))
+            foo = ListOption(
+                item=DictOption(
+                    item=ListOption(item=DictOption())))
 
         config = StringIO("""
 [__main__]
@@ -1063,8 +1063,8 @@
 
     def test_multiple_extra_sections(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(
-                item=DictConfigOption(spec={'bar': IntConfigOption()}))
+            foo = ListOption(
+                item=DictOption(spec={'bar': IntOption()}))
 
         config = StringIO('[__main__]\nfoo=d1\n    d2\n    d3\n'
                           '[d1]\nbar=1\n[d2]\nbar=2\n[d3]\nbar=3')

=== modified file 'configglue/tests/pyschema/test_schema.py'
--- tests/pyschema/test_schema.py	2011-05-20 09:17:22 +0000
+++ configglue/tests/pyschema/test_schema.py	2011-05-20 09:17:23 +0000
@@ -21,32 +21,32 @@
 
 from configglue.pyschema.parser import SchemaConfigParser
 from configglue.pyschema.schema import (
-    BoolConfigOption,
-    ConfigSection,
-    DictConfigOption,
-    IntConfigOption,
-    LinesConfigOption,
+    BoolOption,
+    Section,
+    DictOption,
+    IntOption,
+    ListOption,
     Schema,
-    StringConfigOption,
-    TupleConfigOption,
+    StringOption,
+    TupleOption,
 )
 
 
 class TestSchema(unittest.TestCase):
     def test_sections(self):
         class MySchema(Schema):
-            foo = BoolConfigOption()
+            foo = BoolOption()
 
         class MyOtherSchema(Schema):
-            class web(ConfigSection):
-                bar = IntConfigOption()
-            class froo(ConfigSection):
-                twaddle = LinesConfigOption(item=BoolConfigOption())
+            class web(Section):
+                bar = IntOption()
+            class froo(Section):
+                twaddle = ListOption(item=BoolOption())
 
         class MyThirdSchema(Schema):
-            bar = IntConfigOption()
-            class froo(ConfigSection):
-                twaddle = LinesConfigOption(item=BoolConfigOption())
+            bar = IntOption()
+            class froo(Section):
+                twaddle = ListOption(item=BoolOption())
 
         schema = MySchema()
         names = set(s.name for s in schema.sections())
@@ -62,11 +62,11 @@
 
     def test_schema_validation(self):
         class BorkenSchema(Schema):
-            class __main__(ConfigSection):
-                foo = BoolConfigOption()
+            class __main__(Section):
+                foo = BoolOption()
 
         class SomeSchema(Schema):
-            class mysection(ConfigSection):
+            class mysection(Section):
                 pass
 
         schema = BorkenSchema()
@@ -77,9 +77,9 @@
 
     def test_names(self):
         class MySchema(Schema):
-            foo = BoolConfigOption()
-            class bar(ConfigSection):
-                baz = IntConfigOption()
+            foo = BoolOption()
+            class bar(Section):
+                baz = IntOption()
 
         schema = MySchema()
         self.assertEquals('foo', schema.foo.name)
@@ -90,9 +90,9 @@
 
     def test_options(self):
         class MySchema(Schema):
-            foo = BoolConfigOption()
-            class bar(ConfigSection):
-                baz = IntConfigOption()
+            foo = BoolOption()
+            class bar(Section):
+                baz = IntOption()
 
         schema = MySchema()
         names = set(s.name for s in schema.options())
@@ -108,28 +108,28 @@
 
     def test_equal(self):
         class MySchema(Schema):
-            foo = IntConfigOption()
+            foo = IntOption()
         class OtherSchema(Schema):
-            bar = IntConfigOption()
+            bar = IntOption()
 
         self.assertEqual(MySchema(), MySchema())
         self.assertNotEqual(MySchema(), OtherSchema())
 
 
-class TestConfigOption(unittest.TestCase):
+class TestOption(unittest.TestCase):
     def test_equal(self):
-        opt1 = IntConfigOption(name='opt1')
-        opt2 = IntConfigOption(name='opt2')
-        opt3 = StringConfigOption(name='opt1')
+        opt1 = IntOption(name='opt1')
+        opt2 = IntOption(name='opt2')
+        opt3 = StringOption(name='opt1')
         self.assertEqual(opt1, opt1)
         self.assertNotEqual(opt1, opt2)
         self.assertNotEqual(opt1, opt3)
 
     def test_equal_when_in_section(self):
-        sect1 = ConfigSection(name='sect1')
-        sect2 = ConfigSection(name='sect2')
-        opt1 = IntConfigOption()
-        opt2 = IntConfigOption()
+        sect1 = Section(name='sect1')
+        sect2 = Section(name='sect2')
+        opt1 = IntOption()
+        opt2 = IntOption()
 
         self.assertEqual(opt1, opt2)
 
@@ -138,8 +138,8 @@
         self.assertNotEqual(opt1, opt2)
 
     def test_equal_when_error(self):
-        opt1 = IntConfigOption()
-        opt2 = IntConfigOption()
+        opt1 = IntOption()
+        opt2 = IntOption()
 
         # make sure an attribute error is raised
         del opt2.name
@@ -149,14 +149,14 @@
 class TestSchemaInheritance(unittest.TestCase):
     def setUp(self):
         class SchemaA(Schema):
-            class foo(ConfigSection):
-                bar = IntConfigOption()
+            class foo(Section):
+                bar = IntOption()
         class SchemaB(SchemaA):
-            class baz(ConfigSection):
-                wham = IntConfigOption()
+            class baz(Section):
+                wham = IntOption()
         class SchemaC(SchemaA):
-            class bar(ConfigSection):
-                woof = IntConfigOption()
+            class bar(Section):
+                woof = IntOption()
 
         self.schema = SchemaB()
         self.other = SchemaC()
@@ -165,10 +165,10 @@
         names = [('foo', ['bar']), ('baz', ['wham'])]
         for section, options in names:
             section_obj = getattr(self.schema, section)
-            self.assertTrue(isinstance(section_obj, ConfigSection))
+            self.assertTrue(isinstance(section_obj, Section))
             for option in options:
                 option_obj = getattr(section_obj, option)
-                self.assertTrue(isinstance(option_obj, IntConfigOption))
+                self.assertTrue(isinstance(option_obj, IntOption))
 
     def test_inherited_sections(self):
         names = set(s.name for s in self.schema.sections())
@@ -180,20 +180,20 @@
 
     def test_mutable_inherited(self):
         # modify one inherited attribute
-        self.schema.foo.baz = IntConfigOption()
+        self.schema.foo.baz = IntOption()
 
         # test on the other schema
         self.assertFalse(hasattr(self.other.foo, 'baz'))
 
     def test_merge_inherited(self):
         class SchemaA(Schema):
-            class foo(ConfigSection):
-                bar = IntConfigOption()
-            bar = IntConfigOption()
+            class foo(Section):
+                bar = IntOption()
+            bar = IntOption()
 
         class SchemaB(SchemaA):
             class foo(SchemaA.foo):
-                baz = IntConfigOption()
+                baz = IntOption()
 
         # SchemaB inherits attributes from SchemaA and merges its own
         # attributes into
@@ -215,15 +215,15 @@
         self.assertEqual(foo_option_names, set(['bar']))
 
 
-class TestStringConfigOption(unittest.TestCase):
+class TestStringOption(unittest.TestCase):
     def setUp(self):
-        self.opt = StringConfigOption()
+        self.opt = StringOption()
 
     def test_init_no_args(self):
         self.assertFalse(self.opt.null)
 
     def test_init_null(self):
-        opt = StringConfigOption(null=True)
+        opt = StringOption(null=True)
         self.assertTrue(opt.null)
 
     def test_parse_ascii_string(self):
@@ -235,7 +235,7 @@
         self.assertEqual(value, '')
 
     def test_parse_null_string(self):
-        opt = StringConfigOption(null=True)
+        opt = StringOption(null=True)
         value = opt.parse(None)
         self.assertEqual(value, None)
 
@@ -244,7 +244,7 @@
         self.assertEqual(value, 'None')
 
     def test_parse_nonascii_string(self):
-        foo = StringConfigOption()
+        foo = StringOption()
         value = foo.parse('foóbâr')
         self.assertEqual(value, 'foóbâr')
 
@@ -257,18 +257,18 @@
         self.assertEqual(value, 'False')
 
     def test_default(self):
-        opt = StringConfigOption()
+        opt = StringOption()
         self.assertEqual(opt.default, '')
 
     def test_default_null(self):
-        opt = StringConfigOption(null=True)
+        opt = StringOption(null=True)
         self.assertEqual(opt.default, None)
 
 
-class TestIntConfigOption(unittest.TestCase):
+class TestIntOption(unittest.TestCase):
     def test_parse_int(self):
         class MySchema(Schema):
-            foo = IntConfigOption()
+            foo = IntOption()
         config = StringIO("[__main__]\nfoo = 42")
         expected_values = {'__main__': {'foo': 42}}
         schema = MySchema()
@@ -287,14 +287,14 @@
         self.assertRaises(ValueError, parser.values)
 
     def test_default(self):
-        opt = IntConfigOption()
+        opt = IntOption()
         self.assertEqual(opt.default, 0)
 
 
-class TestBoolConfigOption(unittest.TestCase):
+class TestBoolOption(unittest.TestCase):
     def test_parse_bool(self):
         class MySchema(Schema):
-            foo = BoolConfigOption()
+            foo = BoolOption()
         config = StringIO("[__main__]\nfoo = Yes")
         expected_values = {'__main__': {'foo': True}}
         schema = MySchema()
@@ -318,14 +318,14 @@
         self.assertRaises(ValueError, parser.values)
 
     def test_default(self):
-        opt = BoolConfigOption()
+        opt = BoolOption()
         self.assertEqual(opt.default, False)
 
 
-class TestLinesConfigOption(unittest.TestCase):
+class TestListOption(unittest.TestCase):
     def test_parse_int_lines(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(item=IntConfigOption())
+            foo = ListOption(item=IntOption())
 
         config = StringIO("[__main__]\nfoo = 42\n 43\n 44")
         expected_values = {'__main__': {'foo': [42, 43, 44]}}
@@ -336,7 +336,7 @@
 
     def test_parse_bool_lines(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(item=BoolConfigOption())
+            foo = ListOption(item=BoolOption())
         schema = MySchema()
         config = StringIO("[__main__]\nfoo = tRuE\n No\n 0\n 1")
         expected_values = {'__main__': {'foo': [True, False, False, True]}}
@@ -346,7 +346,7 @@
 
     def test_parse_bool_empty_lines(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(item=BoolConfigOption())
+            foo = ListOption(item=BoolOption())
         schema = MySchema()
         config = StringIO("[__main__]\nfoo =")
         parser = SchemaConfigParser(schema)
@@ -356,7 +356,7 @@
 
     def test_parse_bool_invalid_lines(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(item=BoolConfigOption())
+            foo = ListOption(item=BoolOption())
         schema = MySchema()
         config = StringIO("[__main__]\nfoo = bla")
         parser = SchemaConfigParser(schema)
@@ -369,12 +369,12 @@
         self.assertRaises(ValueError, parser.values)
 
     def test_default(self):
-        opt = LinesConfigOption(item=IntConfigOption())
+        opt = ListOption(item=IntOption())
         self.assertEqual(opt.default, [])
 
     def test_remove_duplicates(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(item=StringConfigOption(),
+            foo = ListOption(item=StringOption(),
                                     remove_duplicates=True)
         schema = MySchema()
         config = StringIO("[__main__]\nfoo = bla\n blah\n bla")
@@ -385,7 +385,7 @@
 
     def test_remove_dict_duplicates(self):
         class MyOtherSchema(Schema):
-            foo = LinesConfigOption(item=DictConfigOption(),
+            foo = ListOption(item=DictOption(),
                                     remove_duplicates=True)
         schema = MyOtherSchema()
         config = StringIO("[__main__]\nfoo = bla\n bla\n[bla]\nbar = baz")
@@ -394,19 +394,19 @@
         self.assertEquals({'__main__': {'foo': [{'bar': 'baz'}]}},
                           parser.values())
 
-class TestTupleConfigOption(unittest.TestCase):
+class TestTupleOption(unittest.TestCase):
     def test_init(self):
-        opt = TupleConfigOption(length=2)
+        opt = TupleOption(length=2)
         self.assertEqual(opt.length, 2)
 
     def test_init_no_length(self):
-        opt = TupleConfigOption()
+        opt = TupleOption()
         self.assertEqual(opt.length, 0)
         self.assertEqual(opt.default, ())
 
     def test_parse_no_length(self):
         class MySchema(Schema):
-            foo = TupleConfigOption()
+            foo = TupleOption()
 
         config = StringIO('[__main__]\nfoo=1,2,3,4')
         expected_values = {'__main__': {'foo': ('1', '2', '3', '4')}}
@@ -416,7 +416,7 @@
 
     def test_parse_tuple(self):
         class MySchema(Schema):
-            foo = TupleConfigOption(length=4)
+            foo = TupleOption(length=4)
         config = StringIO('[__main__]\nfoo = 1, 2, 3, 4')
         expected_values = {'__main__': {'foo': ('1', '2', '3', '4')}}
         schema = MySchema()
@@ -435,28 +435,28 @@
         self.assertRaises(ValueError, parser.values)
 
     def test_default(self):
-        opt = TupleConfigOption(length=2)
+        opt = TupleOption(length=2)
         self.assertEqual(opt.default, ())
 
 
-class TestDictConfigOption(unittest.TestCase):
+class TestDictOption(unittest.TestCase):
     def test_init(self):
-        opt = DictConfigOption()
+        opt = DictOption()
         self.assertEqual(opt.spec, {})
         self.assertEqual(opt.strict, False)
 
-        spec = {'a': IntConfigOption(), 'b': BoolConfigOption()}
-        opt = DictConfigOption(spec=spec)
+        spec = {'a': IntOption(), 'b': BoolOption()}
+        opt = DictOption(spec=spec)
         self.assertEqual(opt.spec, spec)
         self.assertEqual(opt.strict, False)
 
-        opt = DictConfigOption(spec=spec, strict=True)
+        opt = DictOption(spec=spec, strict=True)
         self.assertEqual(opt.spec, spec)
         self.assertEqual(opt.strict, True)
 
     def test_get_extra_sections(self):
         class MySchema(Schema):
-            foo = DictConfigOption(item=DictConfigOption())
+            foo = DictOption(item=DictOption())
 
         config = StringIO("""
 [__main__]
@@ -470,16 +470,16 @@
         parser.readfp(config)
         expected = ['dict2']
 
-        opt = DictConfigOption(item=DictConfigOption())
+        opt = DictOption(item=DictOption())
         extra = opt.get_extra_sections('dict1', parser)
         self.assertEqual(extra, expected)
 
     def test_parse_dict(self):
         class MySchema(Schema):
-            foo = DictConfigOption(spec={
-                'bar': StringConfigOption(),
-                'baz': IntConfigOption(),
-                'bla': BoolConfigOption(),
+            foo = DictOption(spec={
+                'bar': StringOption(),
+                'baz': IntOption(),
+                'bla': BoolOption(),
             })
         config = StringIO("""[__main__]
 foo = mydict
@@ -501,10 +501,10 @@
 
     def test_parse_raw(self):
         class MySchema(Schema):
-            foo = DictConfigOption(spec={
-                'bar': StringConfigOption(),
-                'baz': IntConfigOption(),
-                'bla': BoolConfigOption(),
+            foo = DictOption(spec={
+                'bar': StringOption(),
+                'baz': IntOption(),
+                'bla': BoolOption(),
             })
         config = StringIO("""[__main__]
 foo = mydict
@@ -521,7 +521,7 @@
 
     def test_parse_invalid_key_in_parsed(self):
         class MySchema(Schema):
-            foo = DictConfigOption(spec={'bar': IntConfigOption()})
+            foo = DictOption(spec={'bar': IntOption()})
 
         config = StringIO("[__main__]\nfoo=mydict\n[mydict]\nbaz=2")
         expected_values = {'__main__': {'foo': {'bar': 0, 'baz': '2'}}}
@@ -531,9 +531,9 @@
 
     def test_parse_invalid_key_in_spec(self):
         class MySchema(Schema):
-            foo = DictConfigOption(spec={
-                'bar': IntConfigOption(),
-                'baz': IntConfigOption(fatal=True)})
+            foo = DictOption(spec={
+                'bar': IntOption(),
+                'baz': IntOption(fatal=True)})
 
         config = StringIO("[__main__]\nfoo=mydict\n[mydict]\nbar=2")
         parser = SchemaConfigParser(MySchema())
@@ -541,12 +541,12 @@
         self.assertRaises(ValueError, parser.parse_all)
 
     def test_default(self):
-        opt = DictConfigOption(spec={})
+        opt = DictOption(spec={})
         self.assertEqual(opt.default, {})
 
     def test_parse_no_strict_missing_args(self):
         class MySchema(Schema):
-            foo = DictConfigOption(spec={'bar': IntConfigOption()})
+            foo = DictOption(spec={'bar': IntOption()})
 
         config = StringIO("[__main__]\nfoo=mydict\n[mydict]")
         expected_values = {'__main__': {'foo': {'bar': 0}}}
@@ -556,7 +556,7 @@
 
     def test_parse_no_strict_extra_args(self):
         class MySchema(Schema):
-            foo = DictConfigOption()
+            foo = DictOption()
 
         config = StringIO("[__main__]\nfoo=mydict\n[mydict]\nbar=2")
         expected_values = {'__main__': {'foo': {'bar': '2'}}}
@@ -566,9 +566,9 @@
 
     def test_parse_no_strict_with_item(self):
         class MySchema(Schema):
-            foo = DictConfigOption(
-                      item=DictConfigOption(
-                          item=IntConfigOption()))
+            foo = DictOption(
+                      item=DictOption(
+                          item=IntOption()))
         config = StringIO("""
 [__main__]
 foo = mydict
@@ -584,8 +584,8 @@
 
     def test_parse_strict(self):
         class MySchema(Schema):
-            spec = {'bar': IntConfigOption()}
-            foo = DictConfigOption(spec=spec, strict=True)
+            spec = {'bar': IntOption()}
+            foo = DictOption(spec=spec, strict=True)
 
         config = StringIO("[__main__]\nfoo=mydict\n[mydict]\nbar=2")
         expected_values = {'__main__': {'foo': {'bar': 2}}}
@@ -595,9 +595,9 @@
 
     def test_parse_strict_missing_vars(self):
         class MySchema(Schema):
-            spec = {'bar': IntConfigOption(),
-                    'baz': IntConfigOption()}
-            foo = DictConfigOption(spec=spec, strict=True)
+            spec = {'bar': IntOption(),
+                    'baz': IntOption()}
+            foo = DictOption(spec=spec, strict=True)
 
         config = StringIO("[__main__]\nfoo=mydict\n[mydict]\nbar=2")
         expected_values = {'__main__': {'foo': {'bar': 2, 'baz': 0}}}
@@ -607,8 +607,8 @@
 
     def test_parse_strict_extra_vars(self):
         class MySchema(Schema):
-            spec = {'bar': IntConfigOption()}
-            foo = DictConfigOption(spec=spec, strict=True)
+            spec = {'bar': IntOption()}
+            foo = DictOption(spec=spec, strict=True)
 
         config = StringIO("[__main__]\nfoo=mydict\n[mydict]\nbar=2\nbaz=3")
         parser = SchemaConfigParser(MySchema())
@@ -616,14 +616,14 @@
         self.assertRaises(ValueError, parser.parse_all)
 
 
-class TestLinesOfDictConfigOption(unittest.TestCase):
+class TestLinesOfDictOption(unittest.TestCase):
     def test_parse_lines_of_dict(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(item=DictConfigOption(
+            foo = ListOption(item=DictOption(
                 spec={
-                    'bar': StringConfigOption(),
-                    'baz': IntConfigOption(),
-                    'bla': BoolConfigOption(),
+                    'bar': StringOption(),
+                    'baz': IntOption(),
+                    'bla': BoolOption(),
                 }))
         config = StringIO("""[__main__]
 foo = mylist0
@@ -650,15 +650,15 @@
 
 class TestDictWithDicts(unittest.TestCase):
     def test_parse_dict_with_dicts(self):
-        innerspec = {'bar': StringConfigOption(),
-                     'baz': IntConfigOption(),
-                     'bla': BoolConfigOption(),
+        innerspec = {'bar': StringOption(),
+                     'baz': IntOption(),
+                     'bla': BoolOption(),
                     }
-        spec = {'name': StringConfigOption(),
-                'size': IntConfigOption(),
-                'options': DictConfigOption(spec=innerspec)}
+        spec = {'name': StringOption(),
+                'size': IntOption(),
+                'options': DictOption(spec=innerspec)}
         class MySchema(Schema):
-            foo = DictConfigOption(spec=spec)
+            foo = DictOption(spec=spec)
         config = StringIO("""[__main__]
 foo = outerdict
 [outerdict]
@@ -680,7 +680,7 @@
 class TestListOfTuples(unittest.TestCase):
     def setUp(self):
         class MySchema(Schema):
-            foo = LinesConfigOption(item=TupleConfigOption(length=3))
+            foo = ListOption(item=TupleOption(length=3))
         schema = MySchema()
         self.parser = SchemaConfigParser(schema)
 

=== modified file 'configglue/tests/pyschema/test_schemaconfig.py'
--- tests/pyschema/test_schemaconfig.py	2011-05-20 09:17:22 +0000
+++ configglue/tests/pyschema/test_schemaconfig.py	2011-05-20 09:17:23 +0000
@@ -28,77 +28,77 @@
 )
 from configglue.pyschema.parser import SchemaConfigParser
 from configglue.pyschema.schema import (
-    ConfigOption,
-    ConfigSection,
-    IntConfigOption,
+    Option,
+    Section,
+    IntOption,
     Schema,
-    StringConfigOption,
+    StringOption,
 )
 
 
-class TestConfigOption(unittest.TestCase):
+class TestOption(unittest.TestCase):
     def test_repr_name(self):
-        opt = ConfigOption()
-        expected = "<ConfigOption>"
-        self.assertEqual(repr(opt), expected)
-
-        opt = ConfigOption(name='name')
-        expected = "<ConfigOption name>"
-        self.assertEqual(repr(opt), expected)
-
-        sect = ConfigSection(name='sect')
-        opt = ConfigOption(name='name', section=sect)
-        expected = "<ConfigOption sect.name>"
+        opt = Option()
+        expected = "<Option>"
+        self.assertEqual(repr(opt), expected)
+
+        opt = Option(name='name')
+        expected = "<Option name>"
+        self.assertEqual(repr(opt), expected)
+
+        sect = Section(name='sect')
+        opt = Option(name='name', section=sect)
+        expected = "<Option sect.name>"
         self.assertEqual(repr(opt), expected)
 
     def test_repr_extra(self):
-        opt = ConfigOption(name='name', raw=True)
-        expected = "<ConfigOption name raw>"
-        self.assertEqual(repr(opt), expected)
-
-        opt = ConfigOption(name='name', fatal=True)
-        expected = "<ConfigOption name fatal>"
-        self.assertEqual(repr(opt), expected)
-
-        opt = ConfigOption(name='name', raw=True, fatal=True)
-        expected = "<ConfigOption name raw fatal>"
+        opt = Option(name='name', raw=True)
+        expected = "<Option name raw>"
+        self.assertEqual(repr(opt), expected)
+
+        opt = Option(name='name', fatal=True)
+        expected = "<Option name fatal>"
+        self.assertEqual(repr(opt), expected)
+
+        opt = Option(name='name', raw=True, fatal=True)
+        expected = "<Option name raw fatal>"
         self.assertEqual(repr(opt), expected)
 
     def test_parse(self):
-        opt = ConfigOption()
+        opt = Option()
         self.assertRaises(NotImplementedError, opt.parse, '')
 
     def test_equal(self):
-        opt1 = ConfigOption()
-        opt2 = ConfigOption(name='name', raw=True)
+        opt1 = Option()
+        opt2 = Option(name='name', raw=True)
 
-        self.assertEqual(opt1, ConfigOption())
-        self.assertEqual(opt2, ConfigOption(name='name', raw=True))
+        self.assertEqual(opt1, Option())
+        self.assertEqual(opt2, Option(name='name', raw=True))
         self.assertNotEqual(opt1, opt2)
         self.assertNotEqual(opt1, None)
 
 
-class TestConfigSection(unittest.TestCase):
+class TestSection(unittest.TestCase):
     def test_repr_name(self):
-        sect = ConfigSection()
-        expected = "<ConfigSection>"
+        sect = Section()
+        expected = "<Section>"
         self.assertEqual(repr(sect), expected)
 
-        sect = ConfigSection(name='sect')
-        expected = "<ConfigSection sect>"
+        sect = Section(name='sect')
+        expected = "<Section sect>"
         self.assertEqual(repr(sect), expected)
 
     def test_equal(self):
-        sec1 = ConfigSection()
-        sec2 = ConfigSection(name='sec2')
+        sec1 = Section()
+        sec2 = Section(name='sec2')
 
-        self.assertEqual(sec1, ConfigSection())
-        self.assertEqual(sec2, ConfigSection(name='sec2'))
+        self.assertEqual(sec1, Section())
+        self.assertEqual(sec2, Section(name='sec2'))
         self.assertNotEqual(sec1, sec2)
 
     def test_has_option(self):
-        class sec1(ConfigSection):
-            foo = IntConfigOption()
+        class sec1(Section):
+            foo = IntOption()
 
         sec1 = sec1()
         self.assertTrue(sec1.has_option('foo'))
@@ -108,10 +108,10 @@
 class TestSchemaConfigGlue(unittest.TestCase):
     def setUp(self):
         class MySchema(Schema):
-            class foo(ConfigSection):
-                bar = IntConfigOption()
+            class foo(Section):
+                bar = IntOption()
 
-            baz = IntConfigOption(help='The baz option')
+            baz = IntOption(help='The baz option')
 
         self.parser = SchemaConfigParser(MySchema())
 
@@ -153,11 +153,11 @@
 
     def test_ambiguous_option(self):
         class MySchema(Schema):
-            class foo(ConfigSection):
-                baz = IntConfigOption()
+            class foo(Section):
+                baz = IntOption()
 
-            class bar(ConfigSection):
-                baz = IntConfigOption()
+            class bar(Section):
+                baz = IntOption()
 
         config = StringIO("[foo]\nbaz=1")
         parser = SchemaConfigParser(MySchema())
@@ -193,7 +193,7 @@
 
     def test_parser_set_with_encoding(self):
         class MySchema(Schema):
-            foo = StringConfigOption()
+            foo = StringOption()
 
         parser = SchemaConfigParser(MySchema())
         op, options, args = schemaconfigglue(
@@ -219,7 +219,7 @@
 
         # define the inputs
         class MySchema(Schema):
-            foo = IntConfigOption()
+            foo = IntOption()
 
         configs = ['config.ini']
 
@@ -252,7 +252,7 @@
 
         # define the inputs
         class MySchema(Schema):
-            foo = IntConfigOption()
+            foo = IntOption()
 
         configs = ['config.ini']
 
@@ -288,7 +288,7 @@
 
         # define the inputs
         class MySchema(Schema):
-            foo = IntConfigOption()
+            foo = IntOption()
 
         configs = ['config.ini']
 

=== modified file 'doc/howto/custom-schema-options.rst'
--- doc/howto/custom-schema-options.rst	2011-04-21 02:42:18 +0000
+++ doc/howto/custom-schema-options.rst	2011-05-20 09:17:23 +0000
@@ -9,8 +9,8 @@
 
 The :doc:`schema reference </topics/schemas>` documentation explains how to
 use configglue's standard option classes --
-:class:`~configglue.pyschema.schema.BoolConfigOption`,
-:class:`~configglue.pyschema.schema.IntConfigOption`, etc. For many purposes,
+:class:`~configglue.pyschema.schema.BoolOption`,
+:class:`~configglue.pyschema.schema.IntOption`, etc. For many purposes,
 those classes are all you'll need. Sometimes, though, the configglue version
 won't meet your precise requirements, or you'll want to use a option that is
 entirely different from those shipped with configglue.
@@ -18,38 +18,38 @@
 configglue's built-in option types don't cover every possible data type --
 only the common types, such as ``bool`` and ``int``. For more obscure data
 types, such as complex numbers or even user-created types you can define your
-own configglue :class:`~configglue.pyschema.schema.ConfigOption` subclasses.
+own configglue :class:`~configglue.pyschema.schema.Option` subclasses.
 
 Writing an option subclass
 ==========================
 
-When planning your :class:`~configglue.pyschema.schema.ConfigOption` subclass,
+When planning your :class:`~configglue.pyschema.schema.Option` subclass,
 first give some thought to which existing
-:class:`~configglue.pyschema.schema.ConfigOption` class your new option
+:class:`~configglue.pyschema.schema.Option` class your new option
 is most similar to. Can you subclass an existing configglue option and save
 yourself some work? If not, you should subclass the
-:class:`~configglue.pyschema.schema.ConfigOption` class, from which everything
+:class:`~configglue.pyschema.schema.Option` class, from which everything
 is descended.
 
 Initializing your new option is a matter of separating out any arguments that are
 specific to your case from the common arguments and passing the latter to the
-:meth:`~configglue.pyschema.schema.ConfigOption.__init__` method of
-:class:`~configglue.pyschema.schema.ConfigOption` (or your parent class).
+:meth:`~configglue.pyschema.schema.Option.__init__` method of
+:class:`~configglue.pyschema.schema.Option` (or your parent class).
 
-In our example, we'll call our option ``UpperCaseDictConfigOption``. (It's a
-good idea to call your :class:`~configglue.pyschema.schema.ConfigOption`
-subclass ``<Something>ConfigOption``, so it's easily identifiable as a
-:class:`~configglue.pyschema.schema.ConfigOption` subclass.) It behaves
-mostly like a :class:`~configglue.pyschema.schema.DictConfigOption`, so we'll
+In our example, we'll call our option ``UpperCaseDictOption``. (It's a
+good idea to call your :class:`~configglue.pyschema.schema.Option`
+subclass ``<Something>Option``, so it's easily identifiable as a
+:class:`~configglue.pyschema.schema.Option` subclass.) It behaves
+mostly like a :class:`~configglue.pyschema.schema.DictOption`, so we'll
 subclass from that::
 
     from configglue import pyschema
 
-    class UpperCaseDictConfigOption(pyschema.DictConfigOption):
-        """ A DictConfigOption with all upper-case keys. """
+    class UpperCaseDictOption(pyschema.DictOption):
+        """ A DictOption with all upper-case keys. """
 
         def parse(self, section, parser=None, raw=False):
-            parsed = super(UpperCaseDictConfigOption, self).parse(
+            parsed = super(UpperCaseDictOption, self).parse(
                 section, parser, raw)
             result = {}
             for k, v in parsed.items():
@@ -57,7 +57,7 @@
             return result
 
 
-Our ``UpperCaseDictConfigOption`` will represent a dictionary with all-uppercase
+Our ``UpperCaseDictOption`` will represent a dictionary with all-uppercase
 keys.
 
 So, let's assume we have a configuration file (see documentation on 
@@ -73,7 +73,7 @@
 and a schema like::
 
     class MySchema(pyschema.Schema):
-        mydict = UpperCaseDictConfigOption()
+        mydict = UpperCaseDictOption()
 
 When parsing this configuration file, the parser will contain the following
 value for the ``mydict`` attribute::
@@ -82,6 +82,6 @@
 
 .. note::
     Note that the dictionary values are strings because we didn't specify an
-    item type for the ``UpperCaseDictConfigOption``, and so it defaulted to
-    :class:`~configglue.pyschema.schema.StringConfigOption`.
+    item type for the ``UpperCaseDictOption``, and so it defaulted to
+    :class:`~configglue.pyschema.schema.StringOption`.
 

=== modified file 'doc/index.rst'
--- doc/index.rst	2011-04-21 02:42:18 +0000
+++ doc/index.rst	2011-05-20 09:17:23 +0000
@@ -35,7 +35,7 @@
 
     * **Schemas:**
       :doc:`Schema syntax <topics/schemas>` |
-      :doc:`ConfigOption types <ref/schemas/options>`
+      :doc:`Option types <ref/schemas/options>`
 
     * **Advanced:**
       :doc:`Custom options <howto/custom-schema-options>`

=== modified file 'doc/intro/quickstart.rst'
--- doc/intro/quickstart.rst	2011-04-21 02:42:18 +0000
+++ doc/intro/quickstart.rst	2011-05-20 09:17:23 +0000
@@ -28,8 +28,8 @@
 
         # create the schema
         class MySchema(pyschema.Schema):
-            foo = pyschema.IntConfigOption()
-            bar = pyschema.BoolConfigOption()
+            foo = pyschema.IntOption()
+            bar = pyschema.BoolOption()
 
         # read the configuration files
         scp = pyschema.SchemaConfigParser(MySchema())
@@ -73,8 +73,8 @@
     ::
 
         class MySchema(pyschema.Schema):
-            foo = pyschema.IntConfigOption()
-            bar = pyschema.BoolConfigOption()
+            foo = pyschema.IntOption()
+            bar = pyschema.BoolOption()
 
 #. Create a parser for that schema
 
@@ -129,8 +129,8 @@
 
         # create the schema
         class MySchema(pyschema.Schema):
-            foo = pyschema.IntConfigOption()
-            bar = pyschema.BoolConfigOption()
+            foo = pyschema.IntOption()
+            bar = pyschema.BoolOption()
 
         # glue everything together
         glue = pyschema.configglue(MySchema, ['config.ini'])

=== modified file 'doc/ref/schemas/options.rst'
--- doc/ref/schemas/options.rst	2011-05-02 15:17:01 +0000
+++ doc/ref/schemas/options.rst	2011-05-20 09:17:23 +0000
@@ -21,7 +21,7 @@
     :mod:`configglue.pyschema.schema`, but for convenience they're imported
     into :mod:`configglue.pyschema`; the standard convention is to use
     ``from configglue import pyschema`` and refer to classes as
-    ``pyschema.<Foo>ConfigOption``.
+    ``pyschema.<Foo>Option``.
 
 .. _common-schema-option-attributes:
 
@@ -34,7 +34,7 @@
 ``name``
 --------
 
-.. attribute:: ConfigOption.name
+.. attribute:: Option.name
 
 The name of the option. This will be automatically set to the name assigned to
 the option in the schema definition.
@@ -42,7 +42,7 @@
 ``raw``
 -------
 
-.. attribute:: ConfigOption.raw
+.. attribute:: Option.raw
 
 If ``True``, variable interpolation will not be carried out for this option.
 
@@ -51,7 +51,7 @@
 ``default``
 -----------
 
-.. attribute:: ConfigOption.default
+.. attribute:: Option.default
 
 The default value for this option, if none is provided in the config file.
 
@@ -60,7 +60,7 @@
 ``fatal``
 ---------
 
-.. attribute:: ConfigOption.fatal
+.. attribute:: Option.fatal
 
 If ``True``, ``SchemaConfigParser.parse_all`` will raise an exception if no
 value is provided in the configuration file for this option. Otherwise,
@@ -71,7 +71,7 @@
 ``help``
 --------
 
-.. attribute:: ConfigOption.help
+.. attribute:: Option.help
 
 The help text describing this option. This text will be used as the
 ``optparse.OptParser`` help text.
@@ -81,9 +81,9 @@
 ``section``
 -----------
 
-.. attribute:: ConfigOption.section
+.. attribute:: Option.section
 
-The :class:`~configglue.pyschema.ConfigSection` object where this option was
+The :class:`~configglue.pyschema.Section` object where this option was
 defined.
 
 Default is ``None``.
@@ -91,7 +91,7 @@
 .. ``action``
 ..  ----------
 ..
-..  .. attribute:: ConfigOption.action
+..  .. attribute:: Option.action
 ..
 ..  lorem ipsum
 .. 
@@ -104,49 +104,49 @@
 
 .. currentmodule:: configglue.pyschema.schema
 
-``BoolConfigOption``
+``BoolOption``
 --------------------
 
-.. class:: BoolConfigOption([**attributes])
+.. class:: BoolOption([**attributes])
 
 A true/false option.
 
-``IntConfigOption``
+``IntOption``
 -------------------
 
-.. class:: IntConfigOption([**attributes])
+.. class:: IntOption([**attributes])
 
 An integer.
 
-``LinesConfigOption``
+``ListOption``
 ---------------------
 
-.. class:: LinesConfigOption(item, [remove_duplicates=False, **attributes])
+.. class:: ListOption(item, [remove_duplicates=False, **attributes])
 
 A list of items.
 
-.. attribute:: LinesConfigOption.item
+.. attribute:: ListOption.item
 
     *Required*.
 
     List elements will be parsed as being of this type. Should be an
-    instance of a subclass of :class:`~configglue.pyschema.schema.ConfigOption`.
+    instance of a subclass of :class:`~configglue.pyschema.schema.Option`.
 
-.. attribute:: LinesConfigOption.remove_duplicates
+.. attribute:: ListOption.remove_duplicates
 
     *Optional*.
 
     If ``True``, duplicate elements will be removed from the parsed
     value.
 
-``StringConfigOption``
+``StringOption``
 ----------------------
 
-.. class:: StringConfigOption([null=False, **attributes])
+.. class:: StringOption([null=False, **attributes])
 
 A string.
 
-.. attribute:: StringConfigOption.null
+.. attribute:: StringOption.null
 
     *Optional*.
 
@@ -154,46 +154,46 @@
     instead of just leaving it as the string 'None'.
 
 
-``TupleConfigOption``
+``TupleOption``
 ---------------------
 
-.. class:: TupleConfigOption([length=0, **attributes])
+.. class:: TupleOption([length=0, **attributes])
 
 A tuple of elements.
 
-.. attribute:: TupleConfigOption.length
+.. attribute:: TupleOption.length
 
     *Optional*.
 
     If not 0, the tuple has to have exactly this number of elements.
 
-``DictConfigOption``
+``DictOption``
 --------------------
 
-.. class:: DictConfigOption([spec=None, strict=False, item=None, **attributes])
+.. class:: DictOption([spec=None, strict=False, item=None, **attributes])
 
 A dictionary.
 
-.. attribute:: DictConfigOption.spec
+.. attribute:: DictOption.spec
 
     *Optional*.
 
     If not ``None``, should be a ``dict`` instance, such that its values
     are instances of a subclass of
-    :class:`~configglue.pyschema.schema.ConfigOption`.
+    :class:`~configglue.pyschema.schema.Option`.
 
-.. attribute:: DictConfigOption.strict
+.. attribute:: DictOption.strict
 
     *Optional*.
 
     If ``True``, no keys will be allowed other than those specified
-    in the :attr:`~DictConfigOption.spec`.
+    in the :attr:`~DictOption.spec`.
 
-.. attribute:: DictConfigOption.item
+.. attribute:: DictOption.item
 
     *Optional*.
 
     Any not explicitly defined attributes will be parsed as being
     of this type. This should be an instance of a subclass of
-    :class:`~configglue.pyschema.schema.ConfigOption`.
+    :class:`~configglue.pyschema.schema.Option`.
 

=== modified file 'doc/topics/config-file.rst'
--- doc/topics/config-file.rst	2011-04-29 19:42:50 +0000
+++ doc/topics/config-file.rst	2011-05-20 09:17:23 +0000
@@ -6,11 +6,11 @@
 the configuration, in the same format supported by ConfigParser. Within a
 configuration file, there a few special syntax constructs you should be aware of. 
 
-A ConfigSection is matched by a ConfigParser section, which is defined like::
+A Section is matched by a ConfigParser section, which is defined like::
 
     [my_section]
 
-A ConfigOption is matched by a ConfigParser option, which is defined by a
+A Option is matched by a ConfigParser option, which is defined by a
 simple key, value pair, like::
 
     my_option = the value
@@ -23,8 +23,8 @@
 This configuration file would match with a schema like the following::
 
     class MySchema(pyschema.Schema):
-        my_section = pyschema.ConfigSection()
-        my_section.my_option = pyschema.StringConfigOption()
+        my_section = pyschema.Section()
+        my_section.my_option = pyschema.StringOption()
 
 ======================
 Special considerations
@@ -35,13 +35,13 @@
 
 A few special considerations have to be kept in mind while working with these
 configuration files. As ConfigParser requires a config file to have at least
-one section defined, any top-level ConfigOptions are added to an implicitely
+one section defined, any top-level Options are added to an implicitely
 defined section called ``__main__``.
 
 Therefore, if you have a schema like::
 
     class MySchema(pyschema.Schema):
-        foo = IntConfigOption()
+        foo = IntOption()
 
 and you want to write a configuration file to match it, it would have to look
 like::
@@ -66,7 +66,7 @@
 Tuples
 ------
 
-For specifying the value of a :class:`~configglue.pyschema.schema.TupleConfigOption`,
+For specifying the value of a :class:`~configglue.pyschema.schema.TupleOption`,
 you just put all the values in the same line, separated by `,`, as shown::
 
     my_tuple = 1, 2, 3
@@ -76,7 +76,7 @@
 Lists
 -----
 
-For specifying the value of a :class:`~configglue.pyschema.schema.LinesConfigOption`,
+For specifying the value of a :class:`~configglue.pyschema.schema.ListOption`,
 you just put each value on a different line, as shown::
 
     my_list = 1
@@ -88,9 +88,9 @@
 Dictionaries
 ------------
 
-For specifying the value of a :class:`~configglue.pyschema.schema.DictConfigOption`,
+For specifying the value of a :class:`~configglue.pyschema.schema.DictOption`,
 a special syntax convention was defined. The value of a 
-:class:`~configglue.pyschema.schema.DictConfigOption` is the name of a section
+:class:`~configglue.pyschema.schema.DictOption` is the name of a section
 describing the structure of that dictionary.
 
 For example, given the configuration file::
@@ -104,9 +104,9 @@
 and the schema::
 
     class MySchema(pyschema.Schema):
-        my_dict = pyschema.DictConfigOption(
-            spec={'foo': pyschema.IntConfigOption(),
-                  'bar': pyschema.BoolConfigOption()})
+        my_dict = pyschema.DictOption(
+            spec={'foo': pyschema.IntOption(),
+                  'bar': pyschema.BoolOption()})
 
 `my_dict` would be parsed as::
 

=== modified file 'doc/topics/schemas.rst'
--- doc/topics/schemas.rst	2011-04-21 02:42:18 +0000
+++ doc/topics/schemas.rst	2011-05-20 09:17:23 +0000
@@ -14,8 +14,8 @@
       :class:`~configglue.pyschema.schema.Schema`.
 
     * Each attribute of the schema represents either a configuration section
-      (see :class:`~configglue.pyschema.schema.ConfigSection`) or
-      option (see :class:`~configglue.pyschema.schema.ConfigOption`).
+      (see :class:`~configglue.pyschema.schema.Section`) or
+      option (see :class:`~configglue.pyschema.schema.Option`).
 
 Quick example
 =============
@@ -25,18 +25,18 @@
     from configglue import pyschema
 
     class DatabaseConnection(pyschema.Schema):
-        host = pyschema.StringConfigOption(
+        host = pyschema.StringOption(
             default='localhost',
             help='Host where the database engine is listening on')
-        port = pyschema.IntConfigOption(
+        port = pyschema.IntOption(
             default=5432,
             help='Port where the database engine is listening on')
-        dbname = pyschema.StringConfigOption(
+        dbname = pyschema.StringOption(
             fatal=True,
             help='Name of the database to connect to')
-        user = pyschema.StringConfigOption(
+        user = pyschema.StringOption(
             help='Username to use for the connection')
-        password = pyschema.StringConfigOption(
+        password = pyschema.StringOption(
             help='Password to use fot the connection')
 
 ``host``, ``port``, ``dbname``, ``user`` and ``password`` are options_ of the
@@ -51,14 +51,14 @@
 Example::
 
     class OvenSettings(pyschema.Schema):
-        temperature = pyschema.IntConfigOption()
-        time = pyschema.IntConfigOption()
+        temperature = pyschema.IntOption()
+        time = pyschema.IntOption()
 
 Option types
 ------------
 
 Each option in your schema should be an instance of the appropriate
-:class:`~configglue.pyschema.schema.ConfigOption` class.
+:class:`~configglue.pyschema.schema.Option` class.
 
 configglue ships with a couple of built-in option types; you can find the
 complete list in the :ref:`schema option reference <schema-option-types>`. You
@@ -70,8 +70,8 @@
 
 Each option takes a certain set of option-specific arguments (documented in
 the :ref:`schema option reference <schema-option-types>`). For example,
-:class:`~configglue.pyschema.schema.LinesConfigOption` (and its subclasses)
-require a :attr:`~configglue.pyschema.schema.LinesConfigOption.item` argument
+:class:`~configglue.pyschema.schema.ListOption` (and its subclasses)
+require a :attr:`~configglue.pyschema.schema.ListOption.item` argument
 which specifies the type of the items contained in the list.
 
 There's also a set of common arguments available to all option types. All are
@@ -79,17 +79,17 @@
 <common-schema-option-attributes>`, but here's a quick summary of the most
 often-used ones:
 
-    :attr:`~ConfigOption.default`
+    :attr:`~Option.default`
         The default value for this option, if none is provided in the config file.
         Default is :attr:`configglue.pyschema.schema.NO_DEFAULT`.
 
-    :attr:`~ConfigOption.fatal`
+    :attr:`~Option.fatal`
         If ``True``, :func:`SchemaConfigParser.parse_all` will raise an exception if no
         value is provided in the configuration file for this option. Otherwise,
         :attr:`self.default` will be used. 
         Default is ``False``.
 
-    :attr:`~ConfigOption.help`
+    :attr:`~Option.help`
         The help text describing this option. This text will be used as the
         :class:`optparse.OptParser` help text.
         Default is ``''``.
@@ -106,7 +106,7 @@
     result in a Python syntax error. For example::
 
         class Example(pyschema.Schema):
-            pass = pyschema.IntConfigOption() # 'pass' is a reserved word!
+            pass = pyschema.IntOption() # 'pass' is a reserved word!
 
 Custom option types
 -------------------
@@ -134,12 +134,12 @@
 its attributes from the base classes.
 
 This poses a slight problem for attributes of type
-:class:`~configglue.pyschema.schema.ConfigSection`. Usually, you'll want to
-extend a :class:`~configglue.pyschema.schema.ConfigSection` instead of
+:class:`~configglue.pyschema.schema.Section`. Usually, you'll want to
+extend a :class:`~configglue.pyschema.schema.Section` instead of
 overriding it. In order to achieve this, in your schema subclass, copy the
 parent's attribute explicitely, to avoid modifying the parent schema class.
 Option attributes (derived from
-:class:`~configglue.pyschema.schema.ConfigOption`) will be overridden, as
+:class:`~configglue.pyschema.schema.Option`) will be overridden, as
 expected.
 
 For example::
@@ -150,15 +150,15 @@
 
 
     class BaseSchema(pyschema.Schema):
-        option1 = pyschema.IntConfigOption()
-        section1 = pyschema.ConfigSection()
-        section1.option1 = pyschema.BoolConfigOption()
+        option1 = pyschema.IntOption()
+        section1 = pyschema.Section()
+        section1.option1 = pyschema.BoolOption()
 
 
     class ChildSchema(BaseSchema):
-        option2 = pyschema.IntConfigOption()
+        option2 = pyschema.IntOption()
         section1 = deepcopy(BaseSchema.section1)
-        section1.option2 = IntConfigOption()
+        section1.option2 = IntOption()
 
 In this example :class:`ChildSchema` will have two top-level options,
 :attr:`option1` and :attr:`option2`, and one section :attr:`section1`, which
@@ -170,11 +170,11 @@
     from configglue import pyschema
 
     class ChildSchema(pyschema.Schema):
-        option1 = pyschema.IntConfigOption()
-        option2 = pyschema.IntConfigOption()
-        section1 = pyschema.ConfigSection()
-        section1.option1 = pyschema.BoolConfigOption()
-        section1.option2 = IntConfigOption()
+        option1 = pyschema.IntOption()
+        option2 = pyschema.IntOption()
+        section1 = pyschema.Section()
+        section1.option1 = pyschema.BoolOption()
+        section1.option2 = IntOption()
 
 
 Multiple inheritance

=== modified file 'setup.py'
--- setup.py	2011-02-20 21:52:07 +0000
+++ setup.py	2011-05-20 09:17:23 +0000
@@ -42,9 +42,9 @@
       author_email='john.lenton@xxxxxxxxxxxxx, ricardo.kirkner@xxxxxxxxxxxxx',
       url='https://launchpad.net/configglue',
       license='BSD License',
-      packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
+      packages=find_packages(),
       include_package_data=True,
       zip_safe=True,
-      test_suite='tests',
+      test_suite='configglue.tests',
       tests_require=['mock'],
 )


Follow ups