diff options
author | Carlton Gibson <carlton.gibson@noumenal.es> | 2016-03-19 21:00:22 +0100 |
---|---|---|
committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2016-03-19 21:00:22 +0100 |
commit | c323ecdf8ccf4e9c5f513f9d45352c95de541e2a (patch) | |
tree | 5f1df1ef1d52e1ba8d5c8e1306fff86c90066e83 | |
parent | 190e5d331384a4e3a5586da2a7a62f75b2d89c74 (diff) | |
download | django-appconf-c323ecdf8ccf4e9c5f513f9d45352c95de541e2a.tar.gz |
Remove Python < 2.6 `__members__` support
-rw-r--r-- | appconf/base.py | 5 | ||||
-rw-r--r-- | tests/tests.py | 4 |
2 files changed, 0 insertions, 9 deletions
diff --git a/appconf/base.py b/appconf/base.py index f07def0..d5788ba 100644 --- a/appconf/base.py +++ b/appconf/base.py @@ -122,11 +122,6 @@ class AppConf(six.with_metaclass(AppConfMetaClass)): def configured_data(self): return self._meta.configured_data - # For Python < 2.6: - @property - def __members__(self): - return self.__dir__() - def __getattr__(self, name): if self._meta.proxy: return getattr(self._meta.holder, name) diff --git a/tests/tests.py b/tests/tests.py index 6f9ed47..5650acf 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -52,12 +52,8 @@ class TestConfTests(TestCase): def test_dir_members(self): custom_conf = TestConf() self.assertTrue('TESTS_SIMPLE_VALUE' in dir(settings)) - if hasattr(settings, '__members__'): # django 1.5 removed __members__ - self.assertTrue('TESTS_SIMPLE_VALUE' in settings.__members__) self.assertTrue('SIMPLE_VALUE' in dir(custom_conf)) - self.assertTrue('SIMPLE_VALUE' in custom_conf.__members__) self.assertFalse('TESTS_SIMPLE_VALUE' in dir(custom_conf)) - self.assertFalse('TESTS_SIMPLE_VALUE' in custom_conf.__members__) def test_custom_holder(self): CustomHolderConf() |