commit python3-django-appconf for openSUSE:Factory
Hello community, here is the log from the commit of package python3-django-appconf for openSUSE:Factory checked in at 2015-02-18 11:39:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-django-appconf (Old) and /work/SRC/openSUSE:Factory/.python3-django-appconf.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python3-django-appconf" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-django-appconf/python3-django-appconf.changes 2013-06-25 18:00:12.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-django-appconf.new/python3-django-appconf.changes 2015-02-18 12:09:25.000000000 +0100 @@ -1,0 +2,11 @@ +Tue Feb 17 19:58:27 UTC 2015 - arun@gmx.de + +- specfile: + * update copyright year + +- update to version 1.0.1: + * Dropped support of Python 2.5. + * Added support for Django 1.7 and 1.8. + * Modernized test setup. + +------------------------------------------------------------------- Old: ---- django-appconf-0.6.tar.gz New: ---- django-appconf-1.0.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-django-appconf.spec ++++++ --- /var/tmp/diff_new_pack.4qKTSt/_old 2015-02-18 12:09:25.000000000 +0100 +++ /var/tmp/diff_new_pack.4qKTSt/_new 2015-02-18 12:09:25.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package python3-django-appconf # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python3-django-appconf -Version: 0.6 +Version: 1.0.1 Release: 0 Url: http://django-appconf.readthedocs.org/ Summary: A Helper Class for Handling Configuration Defaults of Packaged Apps ++++++ django-appconf-0.6.tar.gz -> django-appconf-1.0.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/.coveragerc new/django-appconf-1.0.1/.coveragerc --- old/django-appconf-0.6/.coveragerc 1970-01-01 01:00:00.000000000 +0100 +++ new/django-appconf-1.0.1/.coveragerc 2015-02-15 14:20:37.000000000 +0100 @@ -0,0 +1,6 @@ +[run] +source = appconf +branch = 1 + +[report] +omit = *tests* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/.gitignore new/django-appconf-1.0.1/.gitignore --- old/django-appconf-0.6/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/django-appconf-1.0.1/.gitignore 2015-02-15 14:20:37.000000000 +0100 @@ -0,0 +1,9 @@ +build +dist +MANIFEST +*.pyc +*.egg-info +*.egg +docs/_build/ +.coverage +.tox/ \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/.travis.yml new/django-appconf-1.0.1/.travis.yml --- old/django-appconf-0.6/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/django-appconf-1.0.1/.travis.yml 2015-02-15 14:20:37.000000000 +0100 @@ -0,0 +1,30 @@ +language: python +env: + - TOXENV=flake8-py27 + - TOXENV=flake8-py33 + - TOXENV=py26-dj14 + - TOXENV=py27-dj14 + - TOXENV=py26-dj15 + - TOXENV=py26-dj16 + - TOXENV=py27-dj15 + - TOXENV=py27-dj16 + - TOXENV=py32-dj15 + - TOXENV=py32-dj16 + - TOXENV=py33-dj15 + - TOXENV=py33-dj16 + - TOXENV=py27-dj17 + - TOXENV=py27-dj18 + - TOXENV=py27-dj19 + - TOXENV=py32-dj17 + - TOXENV=py32-dj18 + - TOXENV=py32-dj19 + - TOXENV=py33-dj17 + - TOXENV=py33-dj18 + - TOXENV=py33-dj19 + - TOXENV=py34-dj17 + - TOXENV=py34-dj18 + - TOXENV=py34-dj19 +install: + - pip install tox +script: + - tox diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/AUTHORS new/django-appconf-1.0.1/AUTHORS --- old/django-appconf-0.6/AUTHORS 2013-01-28 18:44:32.000000000 +0100 +++ new/django-appconf-1.0.1/AUTHORS 2015-02-15 14:20:37.000000000 +0100 @@ -2,4 +2,5 @@ Jannis Leidel Matthew Tretter Rafal Stozek -Chris Streeter \ No newline at end of file +Chris Streeter +Patrick Altman diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/PKG-INFO new/django-appconf-1.0.1/PKG-INFO --- old/django-appconf-0.6/PKG-INFO 2013-01-28 18:53:14.000000000 +0100 +++ new/django-appconf-1.0.1/PKG-INFO 2015-02-15 14:32:20.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: django-appconf -Version: 0.6 +Version: 1.0.1 Summary: A helper class for handling configuration defaults of packaged apps gracefully. Home-page: http://django-appconf.readthedocs.org/ Author: Jannis Leidel @@ -16,6 +16,16 @@ A helper class for handling configuration defaults of packaged Django apps gracefully. + .. note:: + + This app precedes Django's own AppConfig_ classes that act as + "objects [to] store metadata for an application" inside Django's + app loading mechanism. In other words, they solve a related but + different use case than django-appconf and can't easily be used + as a replacement. The similarity in name is purely coincidental. + + .. _AppConfig: https://docs.djangoproject.com/en/stable/ref/applications/#django.apps.AppCo... + Overview -------- @@ -106,16 +116,18 @@ Platform: UNKNOWN -Classifier: Development Status :: 4 - Beta +Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Web Environment Classifier: Framework :: Django Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2.5 +Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.2 Classifier: Programming Language :: Python :: 3.3 +Classifier: Programming Language :: Python :: 3.4 Classifier: Topic :: Utilities diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/README.rst new/django-appconf-1.0.1/README.rst --- old/django-appconf-0.6/README.rst 2013-01-28 18:43:28.000000000 +0100 +++ new/django-appconf-1.0.1/README.rst 2015-02-15 14:20:37.000000000 +0100 @@ -8,6 +8,16 @@ A helper class for handling configuration defaults of packaged Django apps gracefully. +.. note:: + + This app precedes Django's own AppConfig_ classes that act as + "objects [to] store metadata for an application" inside Django's + app loading mechanism. In other words, they solve a related but + different use case than django-appconf and can't easily be used + as a replacement. The similarity in name is purely coincidental. + +.. _AppConfig: https://docs.djangoproject.com/en/stable/ref/applications/#django.apps.AppCo... + Overview -------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/appconf/__init__.py new/django-appconf-1.0.1/appconf/__init__.py --- old/django-appconf-0.6/appconf/__init__.py 2013-01-28 18:52:41.000000000 +0100 +++ new/django-appconf-1.0.1/appconf/__init__.py 2015-02-15 14:31:55.000000000 +0100 @@ -1,5 +1,4 @@ from __future__ import absolute_import from .base import AppConf # noqa -# following PEP 386 -__version__ = "0.6" +__version__ = "1.0.1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/appconf/base.py new/django-appconf-1.0.1/appconf/base.py --- old/django-appconf-0.6/appconf/base.py 2013-01-28 18:40:37.000000000 +0100 +++ new/django-appconf-1.0.1/appconf/base.py 2015-02-15 14:20:45.000000000 +0100 @@ -1,6 +1,9 @@ -from django.core.exceptions import ImproperlyConfigured import sys + import six + +from django.core.exceptions import ImproperlyConfigured + from .utils import import_attribute @@ -108,7 +111,6 @@ An app setting object to be used for handling app setting defaults gracefully and providing a nice API for them. """ - def __init__(self, **kwargs): for name, value in six.iteritems(kwargs): setattr(self, name, value) @@ -142,6 +144,5 @@ """ Hook for doing any extra configuration, returning a dictionary containing the configured data. - """ return self.configured_data diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/appconf/test_settings.py new/django-appconf-1.0.1/appconf/test_settings.py --- old/django-appconf-0.6/appconf/test_settings.py 2013-01-28 18:40:37.000000000 +0100 +++ new/django-appconf-1.0.1/appconf/test_settings.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -SITE_ID = 1 - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': ':memory:', - } -} - -INSTALLED_APPS = [ - 'django.contrib.contenttypes', - 'django.contrib.sites', - 'django.contrib.auth', - 'django.contrib.admin', - 'appconf.tests', -] - -TEST_RUNNER = 'discover_runner.DiscoverRunner' -SECRET_KEY = 'local' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/appconf/tests/models.py new/django-appconf-1.0.1/appconf/tests/models.py --- old/django-appconf-0.6/appconf/tests/models.py 2013-01-28 18:36:04.000000000 +0100 +++ new/django-appconf-1.0.1/appconf/tests/models.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,65 +0,0 @@ -from appconf import AppConf - - -class CustomHolder(object): - HOLDER_VALUE = True - -custom_holder = CustomHolder() - - -class TestConf(AppConf): - - SIMPLE_VALUE = True - - CONFIGURED_VALUE = 'wrong' - - def configure_configured_value(self, value): - return 'correct' - - def configure(self): - self.configured_data['CONFIGURE_METHOD_VALUE'] = True - return self.configured_data - - -class PrefixConf(TestConf): - - class Meta: - prefix = 'prefix' - - -class YetAnotherPrefixConf(PrefixConf): - - SIMPLE_VALUE = False - - class Meta: - prefix = 'yetanother_prefix' - - -class SeparateConf(AppConf): - - SEPARATE_VALUE = True - - class Meta(PrefixConf.Meta): - pass - - -class SubclassConf(TestConf): - - def configure(self): - self.configured_data['CONFIGURE_METHOD_VALUE2'] = False - return self.configured_data - - -class ProxyConf(TestConf): - - class Meta: - proxy = True - - -class CustomHolderConf(AppConf): - - SIMPLE_VALUE = True - - class Meta: - holder = 'appconf.tests.models.custom_holder' # instead of django.conf.settings - prefix = 'custom_holder' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/appconf/tests/settings.py new/django-appconf-1.0.1/appconf/tests/settings.py --- old/django-appconf-0.6/appconf/tests/settings.py 2012-02-20 00:29:49.000000000 +0100 +++ new/django-appconf-1.0.1/appconf/tests/settings.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -SIMPLE_VALUE = True - -CONFIGURED_VALUE = 'wrong' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/appconf/tests/tests.py new/django-appconf-1.0.1/appconf/tests/tests.py --- old/django-appconf-0.6/appconf/tests/tests.py 2013-01-28 18:40:37.000000000 +0100 +++ new/django-appconf-1.0.1/appconf/tests/tests.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,144 +0,0 @@ -from __future__ import absolute_import -from django.conf import settings -from django.core.exceptions import ImproperlyConfigured -from django.test import TestCase - -from appconf.tests.models import (AppConf, TestConf, PrefixConf, - YetAnotherPrefixConf, SeparateConf, ProxyConf, - CustomHolderConf, custom_holder) - - -class TestConfTests(TestCase): - - def test_basic(self): - self.assertEquals(TestConf._meta.prefix, 'tests') - - def test_simple(self): - self.assertTrue(hasattr(settings, 'TESTS_SIMPLE_VALUE')) - self.assertEquals(settings.TESTS_SIMPLE_VALUE, True) - - def test_configured(self): - self.assertTrue(hasattr(settings, 'TESTS_CONFIGURED_VALUE')) - self.assertEquals(settings.TESTS_CONFIGURED_VALUE, 'correct') - - def test_configure_method(self): - self.assertTrue(hasattr(settings, 'TESTS_CONFIGURE_METHOD_VALUE')) - self.assertEquals(settings.TESTS_CONFIGURE_METHOD_VALUE, True) - - def test_init_kwargs(self): - custom_conf = TestConf(CUSTOM_VALUE='custom') - self.assertEquals(custom_conf.CUSTOM_VALUE, 'custom') - self.assertEquals(settings.TESTS_CUSTOM_VALUE, 'custom') - self.assertRaises(AttributeError, lambda: custom_conf.TESTS_CUSTOM_VALUE) - custom_conf.CUSTOM_VALUE_SETATTR = 'custom' - self.assertEquals(settings.TESTS_CUSTOM_VALUE_SETATTR, 'custom') - custom_conf.custom_value_lowercase = 'custom' - self.assertRaises(AttributeError, lambda: settings.custom_value_lowercase) - - def test_init_kwargs_with_prefix(self): - custom_conf = TestConf(TESTS_CUSTOM_VALUE2='custom2') - self.assertEquals(custom_conf.TESTS_CUSTOM_VALUE2, 'custom2') - self.assertEquals(settings.TESTS_CUSTOM_VALUE2, 'custom2') - - def test_proxy(self): - custom_conf = ProxyConf(CUSTOM_VALUE3='custom3') - self.assertEquals(custom_conf.CUSTOM_VALUE3, 'custom3') - self.assertEquals(settings.TESTS_CUSTOM_VALUE3, 'custom3') - self.assertEquals(custom_conf.TESTS_CUSTOM_VALUE3, 'custom3') - self.assertTrue('appconf.tests' in custom_conf.INSTALLED_APPS) - - 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() - self.assertTrue(hasattr(custom_holder, 'CUSTOM_HOLDER_SIMPLE_VALUE')) - self.assertEquals(custom_holder.CUSTOM_HOLDER_SIMPLE_VALUE, True) - - def test_subclass_configured_data(self): - self.assertTrue('TESTS_CONFIGURE_METHOD_VALUE2' in dir(settings)) - self.assertEquals(settings.TESTS_CONFIGURE_METHOD_VALUE2, False) - - -class PrefixConfTests(TestCase): - - def test_prefix(self): - self.assertEquals(PrefixConf._meta.prefix, 'prefix') - - def test_simple(self): - self.assertTrue(hasattr(settings, 'PREFIX_SIMPLE_VALUE')) - self.assertEquals(settings.PREFIX_SIMPLE_VALUE, True) - - def test_configured(self): - self.assertTrue(hasattr(settings, 'PREFIX_CONFIGURED_VALUE')) - self.assertEquals(settings.PREFIX_CONFIGURED_VALUE, 'correct') - - def test_configure_method(self): - self.assertTrue(hasattr(settings, 'PREFIX_CONFIGURE_METHOD_VALUE')) - self.assertEquals(settings.PREFIX_CONFIGURE_METHOD_VALUE, True) - - -class YetAnotherPrefixConfTests(TestCase): - - def test_prefix(self): - self.assertEquals(YetAnotherPrefixConf._meta.prefix, - 'yetanother_prefix') - - def test_simple(self): - self.assertTrue(hasattr(settings, - 'YETANOTHER_PREFIX_SIMPLE_VALUE')) - self.assertEquals(settings.YETANOTHER_PREFIX_SIMPLE_VALUE, False) - - def test_configured(self): - self.assertTrue(hasattr(settings, - 'YETANOTHER_PREFIX_CONFIGURED_VALUE')) - self.assertEquals(settings.YETANOTHER_PREFIX_CONFIGURED_VALUE, - 'correct') - - def test_configure_method(self): - self.assertTrue(hasattr(settings, - 'YETANOTHER_PREFIX_CONFIGURE_METHOD_VALUE')) - self.assertEquals(settings.YETANOTHER_PREFIX_CONFIGURE_METHOD_VALUE, - True) - - -class SeparateConfTests(TestCase): - - def test_prefix(self): - self.assertEquals(SeparateConf._meta.prefix, 'prefix') - - def test_simple(self): - self.assertTrue(hasattr(settings, 'PREFIX_SEPARATE_VALUE')) - self.assertEquals(settings.PREFIX_SEPARATE_VALUE, True) - - -class RequiredSettingsTests(TestCase): - - def create_invalid_conf(self): - class RequirementConf(AppConf): - class Meta: - required = ['NOT_PRESENT'] - - def test_value_is_defined(self): - class RequirementConf(AppConf): - class Meta: - holder = 'appconf.tests.models.custom_holder' - prefix = 'holder' - required = ['VALUE'] - - def test_default_is_defined(self): - class RequirementConf(AppConf): - SIMPLE_VALUE = True - - class Meta: - required = ['SIMPLE_VALUE'] - - def test_missing(self): - self.assertRaises(ImproperlyConfigured, self.create_invalid_conf) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/appconf/utils.py new/django-appconf-1.0.1/appconf/utils.py --- old/django-appconf-0.6/appconf/utils.py 2012-02-20 00:29:49.000000000 +0100 +++ new/django-appconf-1.0.1/appconf/utils.py 2015-02-15 14:20:37.000000000 +0100 @@ -2,7 +2,10 @@ def import_attribute(import_path, exception_handler=None): - from django.utils.importlib import import_module + try: + from importlib import import_module + except ImportError: + from django.utils.importlib import import_module module_name, object_name = import_path.rsplit('.', 1) try: module = import_module(module_name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/django_appconf.egg-info/PKG-INFO new/django-appconf-1.0.1/django_appconf.egg-info/PKG-INFO --- old/django-appconf-0.6/django_appconf.egg-info/PKG-INFO 2013-01-28 18:53:14.000000000 +0100 +++ new/django-appconf-1.0.1/django_appconf.egg-info/PKG-INFO 2015-02-15 14:32:19.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: django-appconf -Version: 0.6 +Version: 1.0.1 Summary: A helper class for handling configuration defaults of packaged apps gracefully. Home-page: http://django-appconf.readthedocs.org/ Author: Jannis Leidel @@ -16,6 +16,16 @@ A helper class for handling configuration defaults of packaged Django apps gracefully. + .. note:: + + This app precedes Django's own AppConfig_ classes that act as + "objects [to] store metadata for an application" inside Django's + app loading mechanism. In other words, they solve a related but + different use case than django-appconf and can't easily be used + as a replacement. The similarity in name is purely coincidental. + + .. _AppConfig: https://docs.djangoproject.com/en/stable/ref/applications/#django.apps.AppCo... + Overview -------- @@ -106,16 +116,18 @@ Platform: UNKNOWN -Classifier: Development Status :: 4 - Beta +Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Web Environment Classifier: Framework :: Django Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2.5 +Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.2 Classifier: Programming Language :: Python :: 3.3 +Classifier: Programming Language :: Python :: 3.4 Classifier: Topic :: Utilities diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/django_appconf.egg-info/SOURCES.txt new/django-appconf-1.0.1/django_appconf.egg-info/SOURCES.txt --- old/django-appconf-0.6/django_appconf.egg-info/SOURCES.txt 2013-01-28 18:53:14.000000000 +0100 +++ new/django-appconf-1.0.1/django_appconf.egg-info/SOURCES.txt 2015-02-15 14:32:20.000000000 +0100 @@ -1,19 +1,20 @@ +.coveragerc +.gitignore +.travis.yml AUTHORS LICENSE MANIFEST.in README.rst +setup.cfg setup.py +tox.ini appconf/__init__.py appconf/base.py -appconf/test_settings.py appconf/utils.py -appconf/tests/__init__.py -appconf/tests/models.py -appconf/tests/settings.py -appconf/tests/tests.py django_appconf.egg-info/PKG-INFO django_appconf.egg-info/SOURCES.txt django_appconf.egg-info/dependency_links.txt +django_appconf.egg-info/pbr.json django_appconf.egg-info/requires.txt django_appconf.egg-info/top_level.txt docs/Makefile @@ -22,4 +23,9 @@ docs/index.rst docs/make.bat docs/reference.rst -docs/usage.rst \ No newline at end of file +docs/usage.rst +tests/__init__.py +tests/models.py +tests/settings.py +tests/test_settings.py +tests/tests.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/django_appconf.egg-info/pbr.json new/django-appconf-1.0.1/django_appconf.egg-info/pbr.json --- old/django-appconf-0.6/django_appconf.egg-info/pbr.json 1970-01-01 01:00:00.000000000 +0100 +++ new/django-appconf-1.0.1/django_appconf.egg-info/pbr.json 2015-02-15 14:32:19.000000000 +0100 @@ -0,0 +1 @@ +{"is_release": true, "git_version": "75c8ca4"} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/django_appconf.egg-info/requires.txt new/django-appconf-1.0.1/django_appconf.egg-info/requires.txt --- old/django-appconf-0.6/django_appconf.egg-info/requires.txt 2013-01-28 18:53:14.000000000 +0100 +++ new/django-appconf-1.0.1/django_appconf.egg-info/requires.txt 2015-02-15 14:32:19.000000000 +0100 @@ -1 +1 @@ -six \ No newline at end of file +six diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/docs/changelog.rst new/django-appconf-1.0.1/docs/changelog.rst --- old/django-appconf-0.6/docs/changelog.rst 2013-01-28 18:52:33.000000000 +0100 +++ new/django-appconf-1.0.1/docs/changelog.rst 2015-02-15 14:20:37.000000000 +0100 @@ -1,6 +1,25 @@ Changelog ========= +1.0 (2015-02-15) +---------------- + +.. note:: + + This app precedes Django's own AppConfig_ classes that act as + "objects [to] store metadata for an application" inside Django's + app loading mechanism. In other words, they solve a related but + different use case than django-appconf and can't easily be used + as a replacement. The similarity in name is purely coincidental. + +* Dropped support of Python 2.5. + +* Added support for Django 1.7 and 1.8. + +* Modernized test setup. + +.. _AppConfig: https://docs.djangoproject.com/en/stable/ref/applications/#django.apps.AppCo... + 0.6 (2013-01-28) ---------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/docs/usage.rst new/django-appconf-1.0.1/docs/usage.rst --- old/django-appconf-0.6/docs/usage.rst 2012-06-01 19:46:22.000000000 +0200 +++ new/django-appconf-1.0.1/docs/usage.rst 2015-02-15 14:20:37.000000000 +0100 @@ -42,7 +42,7 @@ myapp_settings = MyAppConf(SETTING_1='something completely different') - if 'different' in myapp_settings.SETTINGS_1: + if 'different' in myapp_settings.SETTING_1: print "yay, I'm different!" Custom configuration @@ -72,7 +72,7 @@ The method **must return** the value to be use for the setting in question. -After each of the ``*_configure`` methods have been called, the ``AppConf`` +After each of the ``configure_*`` methods has been called, the ``AppConf`` class will additionally call a main ``configure`` method, which can be used to do any further custom configuration handling, e.g. if multiple settings depend on each other. For that a ``configured_data`` dictionary diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/setup.cfg new/django-appconf-1.0.1/setup.cfg --- old/django-appconf-0.6/setup.cfg 2013-01-28 18:53:14.000000000 +0100 +++ new/django-appconf-1.0.1/setup.cfg 2015-02-15 14:32:20.000000000 +0100 @@ -1,3 +1,6 @@ +[wheel] +universal = 1 + [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/setup.py new/django-appconf-1.0.1/setup.py --- old/django-appconf-0.6/setup.py 2013-01-28 18:40:37.000000000 +0100 +++ new/django-appconf-1.0.1/setup.py 2015-02-15 14:20:37.000000000 +0100 @@ -28,26 +28,23 @@ author_email='jannis@leidel.info', license='BSD', url='http://django-appconf.readthedocs.org/', - packages=[ - 'appconf', - 'appconf.tests', - ], - install_requires=[ - 'six' - ], + packages=['appconf'], + install_requires=['six'], classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.5', + 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', 'Topic :: Utilities', ], ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/tests/models.py new/django-appconf-1.0.1/tests/models.py --- old/django-appconf-0.6/tests/models.py 1970-01-01 01:00:00.000000000 +0100 +++ new/django-appconf-1.0.1/tests/models.py 2015-02-15 14:20:37.000000000 +0100 @@ -0,0 +1,66 @@ +from appconf import AppConf + + +class CustomHolder(object): + HOLDER_VALUE = True + +custom_holder = CustomHolder() + + +class TestConf(AppConf): + + SIMPLE_VALUE = True + + CONFIGURED_VALUE = 'wrong' + + def configure_configured_value(self, value): + return 'correct' + + def configure(self): + self.configured_data['CONFIGURE_METHOD_VALUE'] = True + return self.configured_data + + +class PrefixConf(TestConf): + + class Meta: + prefix = 'prefix' + + +class YetAnotherPrefixConf(PrefixConf): + + SIMPLE_VALUE = False + + class Meta: + prefix = 'yetanother_prefix' + + +class SeparateConf(AppConf): + + SEPARATE_VALUE = True + + class Meta(PrefixConf.Meta): + pass + + +class SubclassConf(TestConf): + + def configure(self): + self.configured_data['CONFIGURE_METHOD_VALUE2'] = False + return self.configured_data + + +class ProxyConf(TestConf): + + class Meta: + proxy = True + + +class CustomHolderConf(AppConf): + + SIMPLE_VALUE = True + + class Meta: + # instead of django.conf.settings + holder = 'tests.models.custom_holder' + prefix = 'custom_holder' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/tests/settings.py new/django-appconf-1.0.1/tests/settings.py --- old/django-appconf-0.6/tests/settings.py 1970-01-01 01:00:00.000000000 +0100 +++ new/django-appconf-1.0.1/tests/settings.py 2015-02-15 14:20:37.000000000 +0100 @@ -0,0 +1,3 @@ +SIMPLE_VALUE = True + +CONFIGURED_VALUE = 'wrong' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/tests/test_settings.py new/django-appconf-1.0.1/tests/test_settings.py --- old/django-appconf-0.6/tests/test_settings.py 1970-01-01 01:00:00.000000000 +0100 +++ new/django-appconf-1.0.1/tests/test_settings.py 2015-02-15 14:20:37.000000000 +0100 @@ -0,0 +1,23 @@ +import django + +SITE_ID = 1 + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': ':memory:', + } +} + +INSTALLED_APPS = [ + 'django.contrib.contenttypes', + 'django.contrib.sites', + 'django.contrib.auth', + 'django.contrib.admin', + 'tests', +] + +if django.VERSION[:2] < (1, 6): + TEST_RUNNER = 'discover_runner.DiscoverRunner' + +SECRET_KEY = 'local' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/tests/tests.py new/django-appconf-1.0.1/tests/tests.py --- old/django-appconf-0.6/tests/tests.py 1970-01-01 01:00:00.000000000 +0100 +++ new/django-appconf-1.0.1/tests/tests.py 2015-02-15 14:20:37.000000000 +0100 @@ -0,0 +1,146 @@ +from __future__ import absolute_import +from django.conf import settings +from django.core.exceptions import ImproperlyConfigured +from django.test import TestCase + +from .models import (AppConf, TestConf, PrefixConf, + YetAnotherPrefixConf, SeparateConf, + ProxyConf, CustomHolderConf, custom_holder) + + +class TestConfTests(TestCase): + + def test_basic(self): + self.assertEqual(TestConf._meta.prefix, 'tests') + + def test_simple(self): + self.assertTrue(hasattr(settings, 'TESTS_SIMPLE_VALUE')) + self.assertEqual(settings.TESTS_SIMPLE_VALUE, True) + + def test_configured(self): + self.assertTrue(hasattr(settings, 'TESTS_CONFIGURED_VALUE')) + self.assertEqual(settings.TESTS_CONFIGURED_VALUE, 'correct') + + def test_configure_method(self): + self.assertTrue(hasattr(settings, 'TESTS_CONFIGURE_METHOD_VALUE')) + self.assertEqual(settings.TESTS_CONFIGURE_METHOD_VALUE, True) + + def test_init_kwargs(self): + custom_conf = TestConf(CUSTOM_VALUE='custom') + self.assertEqual(custom_conf.CUSTOM_VALUE, 'custom') + self.assertEqual(settings.TESTS_CUSTOM_VALUE, 'custom') + self.assertRaises(AttributeError, + lambda: custom_conf.TESTS_CUSTOM_VALUE) + custom_conf.CUSTOM_VALUE_SETATTR = 'custom' + self.assertEqual(settings.TESTS_CUSTOM_VALUE_SETATTR, 'custom') + custom_conf.custom_value_lowercase = 'custom' + self.assertRaises(AttributeError, + lambda: settings.custom_value_lowercase) + + def test_init_kwargs_with_prefix(self): + custom_conf = TestConf(TESTS_CUSTOM_VALUE2='custom2') + self.assertEqual(custom_conf.TESTS_CUSTOM_VALUE2, 'custom2') + self.assertEqual(settings.TESTS_CUSTOM_VALUE2, 'custom2') + + def test_proxy(self): + custom_conf = ProxyConf(CUSTOM_VALUE3='custom3') + self.assertEqual(custom_conf.CUSTOM_VALUE3, 'custom3') + self.assertEqual(settings.TESTS_CUSTOM_VALUE3, 'custom3') + self.assertEqual(custom_conf.TESTS_CUSTOM_VALUE3, 'custom3') + self.assertTrue('tests' in custom_conf.INSTALLED_APPS) + + 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() + self.assertTrue(hasattr(custom_holder, 'CUSTOM_HOLDER_SIMPLE_VALUE')) + self.assertEqual(custom_holder.CUSTOM_HOLDER_SIMPLE_VALUE, True) + + def test_subclass_configured_data(self): + self.assertTrue('TESTS_CONFIGURE_METHOD_VALUE2' in dir(settings)) + self.assertEqual(settings.TESTS_CONFIGURE_METHOD_VALUE2, False) + + +class PrefixConfTests(TestCase): + + def test_prefix(self): + self.assertEqual(PrefixConf._meta.prefix, 'prefix') + + def test_simple(self): + self.assertTrue(hasattr(settings, 'PREFIX_SIMPLE_VALUE')) + self.assertEqual(settings.PREFIX_SIMPLE_VALUE, True) + + def test_configured(self): + self.assertTrue(hasattr(settings, 'PREFIX_CONFIGURED_VALUE')) + self.assertEqual(settings.PREFIX_CONFIGURED_VALUE, 'correct') + + def test_configure_method(self): + self.assertTrue(hasattr(settings, 'PREFIX_CONFIGURE_METHOD_VALUE')) + self.assertEqual(settings.PREFIX_CONFIGURE_METHOD_VALUE, True) + + +class YetAnotherPrefixConfTests(TestCase): + + def test_prefix(self): + self.assertEqual(YetAnotherPrefixConf._meta.prefix, + 'yetanother_prefix') + + def test_simple(self): + self.assertTrue(hasattr(settings, + 'YETANOTHER_PREFIX_SIMPLE_VALUE')) + self.assertEqual(settings.YETANOTHER_PREFIX_SIMPLE_VALUE, False) + + def test_configured(self): + self.assertTrue(hasattr(settings, + 'YETANOTHER_PREFIX_CONFIGURED_VALUE')) + self.assertEqual(settings.YETANOTHER_PREFIX_CONFIGURED_VALUE, + 'correct') + + def test_configure_method(self): + self.assertTrue(hasattr(settings, + 'YETANOTHER_PREFIX_CONFIGURE_METHOD_VALUE')) + self.assertEqual(settings.YETANOTHER_PREFIX_CONFIGURE_METHOD_VALUE, + True) + + +class SeparateConfTests(TestCase): + + def test_prefix(self): + self.assertEqual(SeparateConf._meta.prefix, 'prefix') + + def test_simple(self): + self.assertTrue(hasattr(settings, 'PREFIX_SEPARATE_VALUE')) + self.assertEqual(settings.PREFIX_SEPARATE_VALUE, True) + + +class RequiredSettingsTests(TestCase): + + def create_invalid_conf(self): + class RequirementConf(AppConf): + class Meta: + required = ['NOT_PRESENT'] + + def test_value_is_defined(self): + class RequirementConf(AppConf): + class Meta: + holder = 'tests.models.custom_holder' + prefix = 'holder' + required = ['VALUE'] + + def test_default_is_defined(self): + class RequirementConf(AppConf): + SIMPLE_VALUE = True + + class Meta: + required = ['SIMPLE_VALUE'] + + def test_missing(self): + self.assertRaises(ImproperlyConfigured, self.create_invalid_conf) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-appconf-0.6/tox.ini new/django-appconf-1.0.1/tox.ini --- old/django-appconf-0.6/tox.ini 1970-01-01 01:00:00.000000000 +0100 +++ new/django-appconf-1.0.1/tox.ini 2015-02-15 14:20:37.000000000 +0100 @@ -0,0 +1,50 @@ +[tox] +skipsdist = True +usedevelop = True +minversion = 1.8 +envlist = + flake8-py27, + flake8-py33, + py{26,27}-dj14, + py{26,27,32,33}-dj{15,16}, + py{27,32,33,34}-dj{17,18,19}, + +[testenv] +basepython = + py26: python2.6 + py27: python2.7 + py32: python3.2 + py33: python3.3 + py34: python3.4 + pypy: pypy +usedevelop = true +setenv = + PYTHONPATH = {toxinidir} + DJANGO_SETTINGS_MODULE=tests.test_settings +deps = + flake8 + coverage + django-discover-runner + dj13: https://github.com/django/django/archive/stable/1.3.x.zip#egg=django + dj14: https://github.com/django/django/archive/stable/1.4.x.zip#egg=django + dj15: https://github.com/django/django/archive/stable/1.5.x.zip#egg=django + dj16: https://github.com/django/django/archive/stable/1.6.x.zip#egg=django + dj17: https://github.com/django/django/archive/stable/1.7.x.zip#egg=django + dj18: https://github.com/django/django/archive/stable/1.8.x.zip#egg=django + dj19: https://github.com/django/django/archive/master.zip#egg=django + +commands = + coverage run {envbindir}/django-admin.py test -v2 {posargs:tests} + coverage report + +[testenv:flake8-py27] +commands = flake8 appconf +deps = flake8 + +[testenv:flake8-py33] +commands = flake8 appconf +deps = flake8 + +[flake8] +exclude = .tox +ignore = E501 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de