← Back to team overview

configglue team mailing list archive

[Merge] lp:~ricardokirkner/configglue/remove-deprecation-warnings into lp:configglue

 

Ricardo Kirkner has proposed merging lp:~ricardokirkner/configglue/remove-deprecation-warnings into lp:configglue with lp:~ricardokirkner/configglue/pyschema-refactor as a prerequisite.

Requested reviews:
  Configglue developers (configglue)

For more details, see:
https://code.launchpad.net/~ricardokirkner/configglue/remove-deprecation-warnings/+merge/68312

removed deprecated classes and deprecation warnings
-- 
https://code.launchpad.net/~ricardokirkner/configglue/remove-deprecation-warnings/+merge/68312
Your team Configglue developers is requested to review the proposed merge of lp:~ricardokirkner/configglue/remove-deprecation-warnings into lp:configglue.
=== modified file 'configglue/schema.py'
--- configglue/schema.py	2011-07-19 01:12:40 +0000
+++ configglue/schema.py	2011-07-19 01:12:40 +0000
@@ -20,26 +20,17 @@
 )
 from copy import deepcopy
 from inspect import getmembers
-from warnings import warn
 
 
 __all__ = [
-    'BoolConfigOption',
     'BoolOption',
-    'ConfigOption',
     'Option',
-    'ConfigSection',
     'Section',
-    'DictConfigOption',
     'DictOption',
-    'IntConfigOption',
     'IntOption',
-    'LinesConfigOption',
     'ListOption',
     'Schema',
-    'StringConfigOption',
     'StringOption',
-    'TupleConfigOption',
     'TupleOption',
     'merge',
 ]
@@ -655,46 +646,3 @@
                 sections.extend(extra)
 
         return sections
-
-#
-# deprecated
-#
-
-
-class Deprecated(type):
-    def __init__(cls, name, bases, attrs):
-        warn('{0} is deprecated; use {1} instead.'.format(
-            name, bases[0].__name__), DeprecationWarning)
-        type.__init__(cls, name, bases, attrs)
-
-
-class StringConfigOption(StringOption):
-    __metaclass__ = Deprecated
-
-
-class IntConfigOption(IntOption):
-    __metaclass__ = Deprecated
-
-
-class BoolConfigOption(BoolOption):
-    __metaclass__ = Deprecated
-
-
-class DictConfigOption(DictOption):
-    __metaclass__ = Deprecated
-
-
-class LinesConfigOption(ListOption):
-    __metaclass__ = Deprecated
-
-
-class TupleConfigOption(TupleOption):
-    __metaclass__ = Deprecated
-
-
-class ConfigOption(Option):
-    __metaclass__ = Deprecated
-
-
-class ConfigSection(Section):
-    __metaclass__ = Deprecated

=== modified file 'configglue/tests/test_schema.py'
--- configglue/tests/test_schema.py	2011-07-19 01:12:40 +0000
+++ configglue/tests/test_schema.py	2011-07-19 01:12:40 +0000
@@ -24,22 +24,14 @@
     SchemaValidationError,
 )
 from configglue.schema import (
-    BoolConfigOption,
     BoolOption,
-    ConfigOption,
     Option,
-    ConfigSection,
     Section,
-    DictConfigOption,
     DictOption,
-    IntConfigOption,
     IntOption,
-    LinesConfigOption,
     ListOption,
     Schema,
-    StringConfigOption,
     StringOption,
-    TupleConfigOption,
     TupleOption,
     get_config_objects,
     merge,
@@ -210,10 +202,6 @@
         self.assertEqual(opt.short_name, 'f')
 
 
-class TestConfigOption(TestOption):
-    cls = ConfigOption
-
-
 class TestSchemaInheritance(unittest.TestCase):
     def setUp(self):
         class SchemaA(Schema):
@@ -381,10 +369,6 @@
         self.assertEqual(opt.short_name, 'f')
 
 
-class TestStringConfigOption(TestStringOption):
-    cls = StringConfigOption
-
-
 class TestIntOption(unittest.TestCase):
     cls = IntOption
 
@@ -431,10 +415,6 @@
         self.assertEqual(opt.short_name, 'f')
 
 
-class TestIntConfigOption(TestIntOption):
-    cls = IntConfigOption
-
-
 class TestBoolOption(unittest.TestCase):
     cls = BoolOption
 
@@ -486,10 +466,6 @@
         self.assertEqual(opt.short_name, 'f')
 
 
-class TestBoolConfigOption(TestBoolOption):
-    cls = BoolConfigOption
-
-
 class TestListOption(unittest.TestCase):
     cls = ListOption
 
@@ -595,10 +571,6 @@
         self.assertEqual(opt.short_name, 'f')
 
 
-class TestLinesConfigOption(TestListOption):
-    cls = LinesConfigOption
-
-
 class TestTupleOption(unittest.TestCase):
     cls = TupleOption
 
@@ -667,10 +639,6 @@
         self.assertEqual(opt.short_name, 'f')
 
 
-class TestTupleConfigOption(TupleOption):
-    cls = TupleConfigOption
-
-
 class TestDictOption(unittest.TestCase):
     cls = DictOption
 
@@ -874,10 +842,6 @@
         self.assertEqual(opt.short_name, 'f')
 
 
-class TestDictConfigOption(TestDictOption):
-    cls = DictConfigOption
-
-
 class TestListOfDictOption(unittest.TestCase):
     def test_parse_lines_of_dict(self):
         """Test ListOption parse a list of dicts."""
@@ -1032,10 +996,6 @@
         self.assertEqual(section.options(), [section.foo])
 
 
-class TestConfigSection(TestSection):
-    cls = ConfigSection
-
-
 class MultiSchemaTestCase(unittest.TestCase):
     def test_merge_schemas_no_conflicts(self):
         class SchemaA(Schema):

=== modified file 'configglue/tests/test_schemaconfig.py'
--- configglue/tests/test_schemaconfig.py	2011-07-19 01:12:40 +0000
+++ configglue/tests/test_schemaconfig.py	2011-07-19 01:12:40 +0000
@@ -33,8 +33,6 @@
 )
 from configglue.parser import SchemaConfigParser
 from configglue.schema import (
-    ConfigOption,
-    ConfigSection,
     IntOption,
     Option,
     Schema,
@@ -91,10 +89,6 @@
         self.assertNotEqual(opt1, None)
 
 
-class TestConfigOption(TestOption):
-    cls = ConfigOption
-
-
 class TestSection(unittest.TestCase):
     cls = Section
 
@@ -127,10 +121,6 @@
         self.assertFalse(sec1.has_option('bar'))
 
 
-class TestConfigSection(TestSection):
-    cls = ConfigSection
-
-
 class TestSchemaConfigGlue(unittest.TestCase):
     def setUp(self):
         class MySchema(Schema):


Follow ups