← Back to team overview

configglue team mailing list archive

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

 

Ricardo Kirkner has proposed merging lp:~ricardokirkner/configglue/pyschema-refactor into lp:configglue.

Requested reviews:
  John Lenton (chipaca)
  Configglue developers (configglue)

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

Move configglue.pyschema into configglue to simplify the namespace.

Since pyschema is the default way configglue should be used, there is no need to have to use an inner explicit namespace for that. By moving the pyschema namespace one level up, it simplifies imports, while keeping the inischema support unmodified (you still use the same explicit configglue.inischema namespace to use this 'old' approach).

Updated the docs to reflect the change in the namespaces.

This is one of the steps in producing a 1.0 stable release of configglue (so some backwards-compatibility-preserving changes have been dropped).
-- 
https://code.launchpad.net/~ricardokirkner/configglue/pyschema-refactor/+merge/68195
Your team Configglue developers is requested to review the proposed merge of lp:~ricardokirkner/configglue/pyschema-refactor into lp:configglue.
=== modified file 'configglue/__init__.py'
--- configglue/__init__.py	2011-07-09 18:41:22 +0000
+++ configglue/__init__.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #

=== modified file 'configglue/app/__init__.py'
--- configglue/app/__init__.py	2011-06-05 00:51:43 +0000
+++ configglue/app/__init__.py	2011-07-17 22:59:27 +0000
@@ -1,3 +1,18 @@
+###############################################################################
+#
+# configglue -- glue for your apps' configuration
+#
+# A library for simple, DRY configuration of applications
+#
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+#
+# Released under the BSD License (see the file LICENSE)
+#
+# For bug reports, support, and new releases: http://launchpad.net/configglue
+#
+###############################################################################
 # import into local namespace
 from .base import *
 from .plugin import *

=== modified file 'configglue/app/base.py'
--- configglue/app/base.py	2011-07-16 22:42:06 +0000
+++ configglue/app/base.py	2011-07-17 22:59:27 +0000
@@ -1,11 +1,26 @@
+###############################################################################
+#
+# configglue -- glue for your apps' configuration
+#
+# A library for simple, DRY configuration of applications
+#
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+#
+# Released under the BSD License (see the file LICENSE)
+#
+# For bug reports, support, and new releases: http://launchpad.net/configglue
+#
+###############################################################################
 import os.path
 import sys
 
 from xdg.BaseDirectory import load_config_paths
 
-from configglue.pyschema import (
+from configglue.glue import configglue
+from configglue.schema import (
     Schema,
-    configglue,
     merge,
 )
 from .plugin import PluginManager

=== modified file 'configglue/app/plugin.py'
--- configglue/app/plugin.py	2011-06-18 17:33:52 +0000
+++ configglue/app/plugin.py	2011-07-17 22:59:27 +0000
@@ -1,4 +1,19 @@
-from configglue.pyschema import Schema
+###############################################################################
+#
+# configglue -- glue for your apps' configuration
+#
+# A library for simple, DRY configuration of applications
+#
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+#
+# Released under the BSD License (see the file LICENSE)
+#
+# For bug reports, support, and new releases: http://launchpad.net/configglue
+#
+###############################################################################
+from configglue.schema import Schema
 
 
 __all__ = [

=== modified file 'configglue/app/tests/test_base.py'
--- configglue/app/tests/test_base.py	2011-06-30 04:01:39 +0000
+++ configglue/app/tests/test_base.py	2011-07-17 22:59:27 +0000
@@ -1,3 +1,18 @@
+###############################################################################
+#
+# configglue -- glue for your apps' configuration
+#
+# A library for simple, DRY configuration of applications
+#
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+#
+# Released under the BSD License (see the file LICENSE)
+#
+# For bug reports, support, and new releases: http://launchpad.net/configglue
+#
+###############################################################################
 import os
 import user
 from unittest import TestCase
@@ -15,7 +30,7 @@
     Plugin,
     PluginManager,
 )
-from configglue.pyschema import (
+from configglue.schema import (
     IntOption,
     Schema,
 )
@@ -27,7 +42,7 @@
     # patch sys.stderr to prevent spurious output
     mock_sys = Mock()
     mock_sys.argv = ['foo.py']
-    with patch('configglue.pyschema.glue.sys', mock_sys):
+    with patch('configglue.glue.sys', mock_sys):
         with patch('configglue.app.base.sys.stderr'):
             app = App(name=name, schema=schema, plugin_manager=plugin_manager)
     return app
@@ -40,7 +55,7 @@
     # without conflicting with the schema validation
     mock_sys = Mock()
     mock_sys.argv = ['foo.py']
-    with patch('configglue.pyschema.glue.sys', mock_sys):
+    with patch('configglue.glue.sys', mock_sys):
         config = Config(app)
     return config
 

=== modified file 'configglue/app/tests/test_plugin.py'
--- configglue/app/tests/test_plugin.py	2011-06-18 17:33:52 +0000
+++ configglue/app/tests/test_plugin.py	2011-07-17 22:59:27 +0000
@@ -1,10 +1,25 @@
+###############################################################################
+#
+# configglue -- glue for your apps' configuration
+#
+# A library for simple, DRY configuration of applications
+#
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+#
+# Released under the BSD License (see the file LICENSE)
+#
+# For bug reports, support, and new releases: http://launchpad.net/configglue
+#
+###############################################################################
 from unittest import TestCase
 
 from configglue.app.plugin import (
     Plugin,
     PluginManager,
 )
-from configglue.pyschema import Schema
+from configglue.schema import Schema
 
 
 def make_plugins(available=None, enabled=None):

=== renamed file 'configglue/pyschema/glue.py' => 'configglue/glue.py'
--- configglue/pyschema/glue.py	2011-06-30 03:39:40 +0000
+++ configglue/glue.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #
@@ -24,7 +23,7 @@
 from optparse import OptionParser
 from collections import namedtuple
 
-from configglue.pyschema.parser import SchemaConfigParser
+from configglue.parser import SchemaConfigParser
 
 
 __all__ = [

=== modified file 'configglue/inischema/__init__.py'
--- configglue/inischema/__init__.py	2011-06-13 12:57:26 +0000
+++ configglue/inischema/__init__.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #

=== modified file 'configglue/inischema/attributed.py'
--- configglue/inischema/attributed.py	2011-06-13 12:57:26 +0000
+++ configglue/inischema/attributed.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #

=== modified file 'configglue/inischema/glue.py'
--- configglue/inischema/glue.py	2011-06-18 14:50:01 +0000
+++ configglue/inischema/glue.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #
@@ -24,9 +23,9 @@
 
 from configglue.inischema import parsers
 from configglue.inischema.attributed import AttributedConfigParser
-from configglue.pyschema.glue import schemaconfigglue
-from configglue.pyschema.parser import SchemaConfigParser
-from configglue.pyschema.schema import (
+from configglue.glue import schemaconfigglue
+from configglue.parser import SchemaConfigParser
+from configglue.schema import (
     BoolOption,
     Section,
     IntOption,

=== modified file 'configglue/inischema/parsers.py'
--- configglue/inischema/parsers.py	2011-06-13 12:57:26 +0000
+++ configglue/inischema/parsers.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #

=== modified file 'configglue/inischema/typed.py'
--- configglue/inischema/typed.py	2011-06-13 12:57:26 +0000
+++ configglue/inischema/typed.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #

=== renamed file 'configglue/pyschema/parser.py' => 'configglue/parser.py'
--- configglue/pyschema/parser.py	2011-06-27 17:11:38 +0000
+++ configglue/parser.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #
@@ -30,7 +29,7 @@
     NoSectionError,
 )
 
-from configglue.pyschema.schema import DictOption
+from configglue.schema import DictOption
 
 
 __all__ = [

=== removed directory 'configglue/pyschema'
=== removed file 'configglue/pyschema/__init__.py'
--- configglue/pyschema/__init__.py	2011-06-13 12:57:26 +0000
+++ configglue/pyschema/__init__.py	1970-01-01 00:00:00 +0000
@@ -1,20 +0,0 @@
-###############################################################################
-#
-# configglue -- glue for your apps' configuration
-#
-# A library for simple, DRY configuration of applications
-#
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
-#
-# Released under the BSD License (see the file LICENSE)
-#
-# For bug reports, support, and new releases: http://launchpad.net/configglue
-#
-###############################################################################
-
-from .glue import *
-from .schema import *
-from .parser import *

=== removed file 'configglue/pyschema/options.py'
--- configglue/pyschema/options.py	2011-05-02 15:17:01 +0000
+++ configglue/pyschema/options.py	1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-"""this module is kept around only for backwards-compatibility purposes."""
-from .schema import *

=== renamed file 'configglue/pyschema/schema.py' => 'configglue/schema.py'
--- configglue/pyschema/schema.py	2011-06-30 03:33:54 +0000
+++ configglue/schema.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #

=== modified file 'configglue/tests/__init__.py'
--- configglue/tests/__init__.py	2011-06-13 12:57:26 +0000
+++ configglue/tests/__init__.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #

=== modified file 'configglue/tests/inischema/__init__.py'
--- configglue/tests/inischema/__init__.py	2011-06-13 12:57:26 +0000
+++ configglue/tests/inischema/__init__.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #

=== modified file 'configglue/tests/inischema/test_attributed.py'
--- configglue/tests/inischema/test_attributed.py	2011-06-13 12:57:26 +0000
+++ configglue/tests/inischema/test_attributed.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #

=== modified file 'configglue/tests/inischema/test_glue.py'
--- configglue/tests/inischema/test_glue.py	2011-06-13 12:57:26 +0000
+++ configglue/tests/inischema/test_glue.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #

=== modified file 'configglue/tests/inischema/test_glue2glue.py'
--- configglue/tests/inischema/test_glue2glue.py	2011-06-13 12:57:26 +0000
+++ configglue/tests/inischema/test_glue2glue.py	2011-07-17 22:59:27 +0000
@@ -5,10 +5,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #
@@ -25,7 +24,7 @@
     configglue,
     ini2schema,
 )
-from configglue.pyschema.glue import schemaconfigglue
+from configglue.glue import schemaconfigglue
 
 
 class TestGlueConvertor(unittest.TestCase):

=== modified file 'configglue/tests/inischema/test_parsers.py'
--- configglue/tests/inischema/test_parsers.py	2011-06-13 12:57:26 +0000
+++ configglue/tests/inischema/test_parsers.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #

=== modified file 'configglue/tests/inischema/test_typed.py'
--- configglue/tests/inischema/test_typed.py	2011-06-13 12:57:26 +0000
+++ configglue/tests/inischema/test_typed.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #

=== removed directory 'configglue/tests/pyschema'
=== removed file 'configglue/tests/pyschema/__init__.py'
--- configglue/tests/pyschema/__init__.py	2011-06-13 12:57:26 +0000
+++ configglue/tests/pyschema/__init__.py	1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-###############################################################################
-#
-# configglue -- glue for your apps' configuration
-#
-# A library for simple, DRY configuration of applications
-#
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
-#
-# Released under the BSD License (see the file LICENSE)
-#
-# For bug reports, support, and new releases: http://launchpad.net/configglue
-#
-###############################################################################

=== renamed file 'configglue/tests/pyschema/test_parser.py' => 'configglue/tests/test_parser.py'
--- configglue/tests/pyschema/test_parser.py	2011-06-27 15:43:10 +0000
+++ configglue/tests/test_parser.py	2011-07-17 22:59:27 +0000
@@ -5,10 +5,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #
@@ -36,13 +35,13 @@
     patch_object,
 )
 
-from configglue.pyschema.parser import (
+from configglue.parser import (
     CONFIG_FILE_ENCODING,
     NoOptionError,
     SchemaConfigParser,
     SchemaValidationError,
 )
-from configglue.pyschema.schema import (
+from configglue.schema import (
     BoolOption,
     Section,
     DictOption,
@@ -262,21 +261,21 @@
         self.assertRaises(InterpolationMissingOptionError, parser.get,
                           'foo', 'bar')
 
-    @patch('configglue.pyschema.parser.os')
+    @patch('configglue.parser.os')
     def test_interpolate_environment_basic_syntax(self, mock_os):
         mock_os.environ = {'PATH': 'foo'}
         parser = SchemaConfigParser(Schema())
         result = parser.interpolate_environment("$PATH")
         self.assertEqual(result, 'foo')
 
-    @patch('configglue.pyschema.parser.os')
+    @patch('configglue.parser.os')
     def test_interpolate_environment_extended_syntax(self, mock_os):
         mock_os.environ = {'PATH': 'foo'}
         parser = SchemaConfigParser(Schema())
         result = parser.interpolate_environment("${PATH}")
         self.assertEqual(result, 'foo')
 
-    @patch('configglue.pyschema.parser.os')
+    @patch('configglue.parser.os')
     def test_interpolate_environment_in_config(self, mock_os):
         mock_os.environ = {'PYTHONPATH': 'foo', 'PATH': 'bar'}
 
@@ -296,7 +295,7 @@
         value = parser.interpolate_environment(rawval)
         self.assertEqual(value, rawval)
 
-    @patch('configglue.pyschema.parser.os')
+    @patch('configglue.parser.os')
     def test_get_with_environment_var(self, mock_os):
         mock_os.environ = {'FOO': '42'}
         class MySchema(Schema):

=== renamed file 'configglue/tests/pyschema/test_schema.py' => 'configglue/tests/test_schema.py'
--- configglue/tests/pyschema/test_schema.py	2011-06-30 03:33:54 +0000
+++ configglue/tests/test_schema.py	2011-07-17 22:59:27 +0000
@@ -5,10 +5,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #
@@ -20,11 +19,11 @@
 from ConfigParser import NoOptionError
 from StringIO import StringIO
 
-from configglue.pyschema.parser import (
+from configglue.parser import (
     SchemaConfigParser,
     SchemaValidationError,
 )
-from configglue.pyschema.schema import (
+from configglue.schema import (
     BoolConfigOption,
     BoolOption,
     ConfigOption,

=== renamed file 'configglue/tests/pyschema/test_schemaconfig.py' => 'configglue/tests/test_schemaconfig.py'
--- configglue/tests/pyschema/test_schemaconfig.py	2011-06-30 03:39:40 +0000
+++ configglue/tests/test_schemaconfig.py	2011-07-17 22:59:27 +0000
@@ -5,10 +5,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #
@@ -28,12 +27,12 @@
     patch_object,
 )
 
-from configglue.pyschema.glue import (
+from configglue.glue import (
     configglue,
     schemaconfigglue,
 )
-from configglue.pyschema.parser import SchemaConfigParser
-from configglue.pyschema.schema import (
+from configglue.parser import SchemaConfigParser
+from configglue.schema import (
     ConfigOption,
     ConfigSection,
     IntOption,
@@ -180,7 +179,7 @@
         self.assertEqual(self.parser.values(),
                          {'foo': {'bar': 2}, '__main__': {'baz': 0}})
 
-    @patch('configglue.pyschema.glue.os')
+    @patch('configglue.glue.os')
     def test_glue_environ(self, mock_os):
         mock_os.environ = {'CONFIGGLUE_FOO_BAR': '42', 'CONFIGGLUE_BAZ': 3}
         config = StringIO("[foo]\nbar=1")
@@ -194,7 +193,7 @@
         finally:
             sys.argv = _argv
 
-    @patch('configglue.pyschema.glue.os')
+    @patch('configglue.glue.os')
     def test_glue_environ_bad_name(self, mock_os):
         mock_os.environ = {'FOO_BAR': 2, 'BAZ': 3}
         config = StringIO("[foo]\nbar=1")
@@ -333,8 +332,8 @@
 
 
 class ConfigglueTestCase(unittest.TestCase):
-    @patch('configglue.pyschema.glue.SchemaConfigParser')
-    @patch('configglue.pyschema.glue.schemaconfigglue')
+    @patch('configglue.glue.SchemaConfigParser')
+    @patch('configglue.glue.schemaconfigglue')
     def test_configglue_no_errors(self, mock_schemaconfigglue,
         mock_schema_parser):
         """Test configglue when no errors occur."""
@@ -369,8 +368,8 @@
         self.assertEqual(glue.options, expected_options)
         self.assertEqual(glue.args, expected_args)
 
-    @patch('configglue.pyschema.glue.SchemaConfigParser')
-    @patch('configglue.pyschema.glue.schemaconfigglue')
+    @patch('configglue.glue.SchemaConfigParser')
+    @patch('configglue.glue.schemaconfigglue')
     def test_configglue_with_errors(self, mock_schemaconfigglue,
         mock_schema_parser):
         """Test configglue when an error happens."""
@@ -406,9 +405,9 @@
         self.assertEqual(glue.options, expected_options)
         self.assertEqual(glue.args, expected_args)
 
-    @patch('configglue.pyschema.glue.OptionParser')
-    @patch('configglue.pyschema.glue.SchemaConfigParser')
-    @patch('configglue.pyschema.glue.schemaconfigglue')
+    @patch('configglue.glue.OptionParser')
+    @patch('configglue.glue.SchemaConfigParser')
+    @patch('configglue.glue.schemaconfigglue')
     def test_configglue_with_usage(self, mock_schemaconfigglue,
         mock_schema_parser, mock_option_parser):
         """Test configglue with the 'usage' parameter set."""

=== modified file 'doc/faq/install.rst'
--- doc/faq/install.rst	2011-04-21 02:42:18 +0000
+++ doc/faq/install.rst	2011-07-17 22:59:27 +0000
@@ -17,10 +17,12 @@
 ------------------------------------
 
 configglue requires Python_, specifically any version of Python from 2.6
-through 2.7. No other Python libraries are required for basic configglue
-usage.
+through 2.7. It also requires pyxdg_, for automatically finding configuration
+files from standard locations, when using the provided
+:class:`~configglue.app.base.App` base class.
 
 .. _Python: http://www.python.org/
+.. _pyxdg: http://www.freedesktop.org/wiki/Software/pyxdg
 
 Can I use Django with Python 3?
 -------------------------------

=== modified file 'doc/howto/custom-schema-options.rst'
--- doc/howto/custom-schema-options.rst	2011-07-09 19:53:23 +0000
+++ doc/howto/custom-schema-options.rst	2011-07-17 22:59:27 +0000
@@ -2,15 +2,15 @@
 Writing custom option types
 ===========================
 
-.. currentmodule:: configglue.pyschema.schema
+.. currentmodule:: configglue.schema
 
 Introduction
 ============
 
 The :doc:`schema reference </topics/schemas>` documentation explains how to
 use configglue's standard option classes --
-:class:`~configglue.pyschema.schema.BoolOption`,
-:class:`~configglue.pyschema.schema.IntOption`, etc. For many purposes,
+:class:`~configglue.schema.BoolOption`,
+:class:`~configglue.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,34 +18,34 @@
 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.Option` subclasses.
+own configglue :class:`~configglue.schema.Option` subclasses.
 
 Writing an option subclass
 ==========================
 
-When planning your :class:`~configglue.pyschema.schema.Option` subclass,
+When planning your :class:`~configglue.schema.Option` subclass,
 first give some thought to which existing
-:class:`~configglue.pyschema.schema.Option` class your new option
+:class:`~configglue.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.Option` class, from which everything
+:class:`~configglue.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.Option.__init__` method of
-:class:`~configglue.pyschema.schema.Option` (or your parent class).
+:meth:`~configglue.schema.Option.__init__` method of
+:class:`~configglue.schema.Option` (or your parent class).
 
 In our example, we'll call our option ``UpperCaseDictOption``. (It's a
-good idea to call your :class:`~configglue.pyschema.schema.Option`
+good idea to call your :class:`~configglue.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
+:class:`~configglue.schema.Option` subclass.) It behaves
+mostly like a :class:`~configglue.schema.DictOption`, so we'll
 subclass from that::
 
-    from configglue import pyschema
+    from configglue import schema
 
-    class UpperCaseDictOption(pyschema.DictOption):
+    class UpperCaseDictOption(schema.DictOption):
         """ A DictOption with all upper-case keys. """
 
         def parse(self, section, parser=None, raw=False):
@@ -72,7 +72,7 @@
 
 and a schema like::
 
-    class MySchema(pyschema.Schema):
+    class MySchema(schema.Schema):
         mydict = UpperCaseDictOption()
 
 When parsing this configuration file, the parser will contain the following
@@ -83,5 +83,5 @@
 .. note::
     Note that the dictionary values are strings because we didn't specify an
     item type for the ``UpperCaseDictOption``, and so it defaulted
-    to :class:`~configglue.pyschema.schema.StringOption`.
+    to :class:`~configglue.schema.StringOption`.
 

=== modified file 'doc/intro/quickstart.rst'
--- doc/intro/quickstart.rst	2011-06-18 14:50:01 +0000
+++ doc/intro/quickstart.rst	2011-07-17 22:59:27 +0000
@@ -24,19 +24,19 @@
                 print "%s option has default value: %s" % (opt, option.default)
 
     if __name__ == '__main__':
-        from configglue import pyschema
+        from configglue import schema
 
         # create the schema
-        class MySchema(pyschema.Schema):
-            foo = pyschema.IntOption()
-            bar = pyschema.BoolOption()
+        class MySchema(schema.Schema):
+            foo = schema.IntOption()
+            bar = schema.BoolOption()
 
         # read the configuration files
-        scp = pyschema.SchemaConfigParser(MySchema())
+        scp = schema.SchemaConfigParser(MySchema())
         scp.read(['config.ini'])
 
         # support command-line integration
-        op, opts, args = pyschema.schemaconfigglue(scp)
+        op, opts, args = schema.schemaconfigglue(scp)
 
         # validate the config (after taking into account any command-line
         # provided options
@@ -72,15 +72,15 @@
 
     ::
 
-        class MySchema(pyschema.Schema):
-            foo = pyschema.IntOption()
-            bar = pyschema.BoolOption()
+        class MySchema(schema.Schema):
+            foo = schema.IntOption()
+            bar = schema.BoolOption()
 
 #. Create a parser for that schema
 
     ::
 
-        scp = pyschema.SchemaConfigParser(MySchema())
+        scp = schema.SchemaConfigParser(MySchema())
 
 #. Read the configuration files (to get the statically defined configuration
    values)
@@ -94,7 +94,7 @@
 
     ::
 
-        op, opts, args = pyschema.schemaconfigglue(scp)
+        op, opts, args = schema.schemaconfigglue(scp)
 
 #. (Optional) Validate the effective configuration (to capture any
    configuration issues)
@@ -109,7 +109,7 @@
 you do, there is also a utility function you can use to avoid repeating
 yourself.
 
-When using that function (see :func:`configglue.pyschema.glue.configglue`),
+When using that function (see :func:`configglue.glue.configglue`),
 this code would look like::
 
     def main(config, opts):
@@ -125,15 +125,15 @@
                 print "%s option has default value: %s" % (opt, option.default)
 
     if __name__ == '__main__':
-        from configglue import pyschema
+        from configglue import schema, glue
 
         # create the schema
-        class MySchema(pyschema.Schema):
-            foo = pyschema.IntOption()
-            bar = pyschema.BoolOption()
+        class MySchema(schema.Schema):
+            foo = schema.IntOption()
+            bar = schema.BoolOption()
 
         # glue everything together
-        glue = pyschema.configglue(MySchema, ['config.ini'])
+        glue = glue.configglue(MySchema, ['config.ini'])
 
         # run
         main(glue.schema_parser, glue.options)

=== modified file 'doc/ref/app/plugin.rst'
--- doc/ref/app/plugin.rst	2011-07-09 19:37:20 +0000
+++ doc/ref/app/plugin.rst	2011-07-17 22:59:27 +0000
@@ -23,7 +23,7 @@
     This is the schema class describing any configuration specific to your
     plugin.
 
-    By default a standard :class:`~configglue.pyschema.schema.Schema` is used.
+    By default a standard :class:`~configglue.schema.Schema` is used.
 
 .. attribute:: Plugin.enabled
 

=== modified file 'doc/ref/schemas/options.rst'
--- doc/ref/schemas/options.rst	2011-07-09 17:28:50 +0000
+++ doc/ref/schemas/options.rst	2011-07-17 22:59:27 +0000
@@ -2,10 +2,10 @@
 Schema option reference
 =======================
 
-.. module:: configglue.pyschema.schema
+.. module:: configglue.schema
     :synopsis: Built-in options types.
 
-.. currentmodule:: configglue.pyschema
+.. currentmodule:: configglue
 
 This document contains details about the `option attributes`_ and
 `option types`_ included in configglue.
@@ -15,14 +15,6 @@
     If the built-in options don't do the trick, you can easily
     :doc:`write your own custom schema options </howto/custom-schema-options>`. 
 
-.. note::
-
-    Technically, these classes are defined in
-    :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>Option``.
-
 .. _common-schema-option-attributes:
 
 Option attributes
@@ -55,7 +47,7 @@
 
 The default value for this option, if none is provided in the config file.
 
-Default is ``configglue.pyschema.schema.NO_DEFAULT``.
+Default is ``configglue.schema.NO_DEFAULT``.
 
 ``fatal``
 ---------
@@ -83,7 +75,7 @@
 
 .. attribute:: Option.section
 
-The :class:`~configglue.pyschema.Section` object where this option was
+The :class:`~configglue.Section` object where this option was
 defined.
 
 Default is ``None``.
@@ -110,7 +102,7 @@
 Option types
 ============
 
-.. currentmodule:: configglue.pyschema.schema
+.. currentmodule:: configglue.schema
 
 ``BoolOption``
 --------------------
@@ -138,7 +130,7 @@
     *Required*.
 
     List elements will be parsed as being of this type. Should be an
-    instance of a subclass of :class:`~configglue.pyschema.schema.Option`.
+    instance of a subclass of :class:`~configglue.schema.Option`.
 
 .. attribute:: ListOption.remove_duplicates
 
@@ -188,7 +180,7 @@
 
     If not ``None``, should be a ``dict`` instance, such that its values
     are instances of a subclass of
-    :class:`~configglue.pyschema.schema.Option`.
+    :class:`~configglue.schema.Option`.
 
 .. attribute:: DictOption.strict
 
@@ -203,5 +195,5 @@
 
     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.Option`.
+    :class:`~configglue.schema.Option`.
 

=== modified file 'doc/topics/command-line.rst'
--- doc/topics/command-line.rst	2011-07-09 18:39:32 +0000
+++ doc/topics/command-line.rst	2011-07-17 22:59:27 +0000
@@ -28,12 +28,12 @@
 Short-form names
 ================
 
-If the :class:`~configglue.pyschema.Option` has a non-empty
-:attr:`~configglue.pyschema.Option.short_name` set, this will be used as the
+If the :class:`~configglue.schema.Option` has a non-empty
+:attr:`~configglue.schema.Option.short_name` set, this will be used as the
 short-form name for the command line parameter. For example, given the
 schema ::
 
-    class MySchema(pyschema.Schema):
+    class MySchema(schema.Schema):
         foo = IntOption(short_name='f')
 
 the following forms of specifying a value for this option are equivalent::

=== modified file 'doc/topics/config-file.rst'
--- doc/topics/config-file.rst	2011-07-09 18:39:32 +0000
+++ doc/topics/config-file.rst	2011-07-17 22:59:27 +0000
@@ -22,9 +22,9 @@
 
 This configuration file would match with a schema like the following::
 
-    class MySchema(pyschema.Schema):
-        class MySection(pyschema.Section):
-            my_option = pyschema.StringOption()
+    class MySchema(schema.Schema):
+        class MySection(schema.Section):
+            my_option = schema.StringOption()
 
 ======================
 Special considerations
@@ -40,7 +40,7 @@
 
 Therefore, if you have a schema like::
 
-    class MySchema(pyschema.Schema):
+    class MySchema(schema.Schema):
         foo = IntOption()
 
 and you want to write a configuration file to match it, it would have to look
@@ -66,7 +66,7 @@
 Tuples
 ------
 
-For specifying the value of a :class:`~configglue.pyschema.schema.TupleOption`,
+For specifying the value of a :class:`~configglue.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.ListOption`,
+For specifying the value of a :class:`~configglue.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.DictOption`,
+For specifying the value of a :class:`~configglue.schema.DictOption`,
 a special syntax convention was defined. The value of a 
-:class:`~configglue.pyschema.schema.DictOption` is the name of a section
+:class:`~configglue.schema.DictOption` is the name of a section
 describing the structure of that dictionary.
 
 For example, given the configuration file::
@@ -103,10 +103,10 @@
 
 and the schema::
 
-    class MySchema(pyschema.Schema):
-        my_dict = pyschema.DictOption(
-            spec={'foo': pyschema.IntOption(),
-                  'bar': pyschema.BoolOption()})
+    class MySchema(schema.Schema):
+        my_dict = schema.DictOption(
+            spec={'foo': schema.IntOption(),
+                  'bar': schema.BoolOption()})
 
 `my_dict` would be parsed as::
 

=== modified file 'doc/topics/schemas.rst'
--- doc/topics/schemas.rst	2011-07-09 19:42:18 +0000
+++ doc/topics/schemas.rst	2011-07-17 22:59:27 +0000
@@ -9,32 +9,32 @@
 The basics:
 
     * Each schema is a Python class that subclasses
-      :class:`~configglue.pyschema.schema.Schema`.
+      :class:`~configglue.schema.Schema`.
 
     * Each attribute of the schema represents either a configuration section
-      (see :class:`~configglue.pyschema.schema.Section`) or
-      option (see :class:`~configglue.pyschema.schema.Option`).
+      (see :class:`~configglue.schema.Section`) or
+      option (see :class:`~configglue.schema.Option`).
 
 Quick example
 =============
 
 This example schema defines the configuration for a database connection::
 
-    from configglue import pyschema
+    from configglue import schema
 
-    class DatabaseConnection(pyschema.Schema):
-        host = pyschema.StringOption(
+    class DatabaseConnection(schema.Schema):
+        host = schema.StringOption(
             default='localhost',
             help='Host where the database engine is listening on')
-        port = pyschema.IntOption(
+        port = schema.IntOption(
             default=5432,
             help='Port where the database engine is listening on')
-        dbname = pyschema.StringOption(
+        dbname = schema.StringOption(
             fatal=True,
             help='Name of the database to connect to')
-        user = pyschema.StringOption(
+        user = schema.StringOption(
             help='Username to use for the connection')
-        password = pyschema.StringOption(
+        password = schema.StringOption(
             help='Password to use fot the connection')
 
 ``host``, ``port``, ``dbname``, ``user`` and ``password`` are options_ of the
@@ -48,15 +48,15 @@
 
 Example::
 
-    class OvenSettings(pyschema.Schema):
-        temperature = pyschema.IntOption()
-        time = pyschema.IntOption()
+    class OvenSettings(schema.Schema):
+        temperature = schema.IntOption()
+        time = schema.IntOption()
 
 Option types
 ------------
 
 Each option in your schema should be an instance of the appropriate
-:class:`~configglue.pyschema.schema.Option` class.
+:class:`~configglue.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
@@ -68,8 +68,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.ListOption` (and its subclasses)
-require a :attr:`~configglue.pyschema.schema.ListOption.item` argument
+:class:`~configglue.schema.ListOption` (and its subclasses)
+require a :attr:`~configglue.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,7 +79,7 @@
 
     :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`.
+        Default is :attr:`configglue.schema.NO_DEFAULT`.
 
     :attr:`~Option.fatal`
         If ``True``, :func:`SchemaConfigParser.parse_all` will raise an exception if no
@@ -103,8 +103,8 @@
     A option name cannot be a Python reserved word, because that would
     result in a Python syntax error. For example::
 
-        class Example(pyschema.Schema):
-            pass = pyschema.IntOption() # 'pass' is a reserved word!
+        class Example(schema.Schema):
+            pass = schema.IntOption() # 'pass' is a reserved word!
 
 Custom option types
 -------------------
@@ -132,33 +132,29 @@
 its attributes from the base classes.
 
 This poses a slight problem for attributes of type
-:class:`~configglue.pyschema.schema.Section`. Usually, you'll want to
-extend a :class:`~configglue.pyschema.schema.Section` instead of
+:class:`~configglue.schema.Section`. Usually, you'll want to
+extend a :class:`~configglue.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.Option`) will be overridden, as
+:class:`~configglue.schema.Option`) will be overridden, as
 expected.
 
 For example::
 
-    from copy import deepcopy
-
-    from configglue import pyschema
-
-
-    class BaseSchema(pyschema.Schema):
-        option1 = pyschema.IntOption()
-
-        class MySection(pyschema.Section):
-            option1 = pyschema.BoolOption()
-
+    from configglue import schema
+
+    class BaseSchema(schema.Schema):
+        option1 = schema.IntOption()
+
+        class MySection(schema.Section):
+            option1 = schema.BoolOption()
 
     class ChildSchema(BaseSchema):
-        option2 = pyschema.IntOption()
+        option2 = schema.IntOption()
 
         class MySection(BaseSchema.MySection):
-            option2 = IntOption()
+            option2 = schema.IntOption()
 
 In this example :class:`ChildSchema` will have two top-level options,
 :attr:`option1` and :attr:`option2`, and one section :attr:`MySection`, which
@@ -167,15 +163,15 @@
 produces the same result as explicitely describing each attribute, as
 expected::
 
-    from configglue import pyschema
-
-    class ChildSchema(pyschema.Schema):
-        option1 = pyschema.IntOption()
-        option2 = pyschema.IntOption()
-
-        class MySection(pyschema.Section):
-            option1 = pyschema.BoolOption()
-            option2 = IntOption()
+    from configglue import schema
+
+    class ChildSchema(schema.Schema):
+        option1 = schema.IntOption()
+        option2 = schema.IntOption()
+
+        class MySection(schema.Section):
+            option1 = schema.BoolOption()
+            option2 = schema.IntOption()
 
 
 Multiple inheritance

=== modified file 'setup.py'
--- setup.py	2011-07-16 22:42:06 +0000
+++ setup.py	2011-07-17 22:59:27 +0000
@@ -4,10 +4,9 @@
 #
 # A library for simple, DRY configuration of applications
 #
-# (C) 2009--2010 by Canonical Ltd.
-# originally by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
-# incorporating schemaconfig as configglue.pyschema
-# schemaconfig originally by Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
+# (C) 2009--2011 by Canonical Ltd.
+# by John R. Lenton <john.lenton@xxxxxxxxxxxxx>
+# and Ricardo Kirkner <ricardo.kirkner@xxxxxxxxxxxxx>
 #
 # Released under the BSD License (see the file LICENSE)
 #


Follow ups