{"action":"created","issue":{"url":"https://api.github.com/repos/zlorf/django-dbsettings/issues/13","labels_url":"https://api.github.com/repos/zlorf/django-dbsettings/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/zlorf/django-dbsettings/issues/13/comments","events_url":"https://api.github.com/repos/zlorf/django-dbsettings/issues/13/events","html_url":"https://github.com/zlorf/django-dbsettings/pull/13","id":68967285,"number":13,"title":"Use six from django.utils.six and no six package from default python","user":{"login":"helber","id":192009,"avatar_url":"https://avatars.githubusercontent.com/u/192009?v=3","gravatar_id":"","url":"https://api.github.com/users/helber","html_url":"https://github.com/helber","followers_url":"https://api.github.com/users/helber/followers","following_url":"https://api.github.com/users/helber/following{/other_user}","gists_url":"https://api.github.com/users/helber/gists{/gist_id}","starred_url":"https://api.github.com/users/helber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helber/subscriptions","organizations_url":"https://api.github.com/users/helber/orgs","repos_url":"https://api.github.com/users/helber/repos","events_url":"https://api.github.com/users/helber/events{/privacy}","received_events_url":"https://api.github.com/users/helber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-16T17:06:27Z","updated_at":"2015-04-16T18:10:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zlorf/django-dbsettings/pulls/13","html_url":"https://github.com/zlorf/django-dbsettings/pull/13","diff_url":"https://github.com/zlorf/django-dbsettings/pull/13.diff","patch_url":"https://github.com/zlorf/django-dbsettings/pull/13.patch"},"body":"The main change is about use six from django.utils.six package to avoi version conflicts with six package from default python package. Depending on six version the dbsettings broke with \"AttributeError: 'module' object has no attribute 'add_metaclass'\"\r\nAnother changes is trivial conversion from dos to unix format.\r\n\r\nBacktrace:\r\n<pre>\r\nTraceback (most recent call last):\r\n  File \"./manage.py\", line 10, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/iptv/var/www/sites/site_iptv/django/core/management/__init__.py\", line 399, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/iptv/var/www/sites/site_iptv/django/core/management/__init__.py\", line 392, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/iptv/var/www/sites/site_iptv/django/core/management/base.py\", line 242, in run_from_argv\r\n    self.execute(*args, **options.__dict__)\r\n  File \"/iptv/var/www/sites/site_iptv/django/core/management/base.py\", line 280, in execute\r\n    translation.activate('en-us')\r\n  File \"/iptv/var/www/sites/site_iptv/django/utils/translation/__init__.py\", line 130, in activate\r\n    return _trans.activate(language)\r\n  File \"/iptv/var/www/sites/site_iptv/django/utils/translation/trans_real.py\", line 188, in activate\r\n    _active.value = translation(language)\r\n  File \"/iptv/var/www/sites/site_iptv/django/utils/translation/trans_real.py\", line 177, in translation\r\n    default_translation = _fetch(settings.LANGUAGE_CODE)\r\n  File \"/iptv/var/www/sites/site_iptv/django/utils/translation/trans_real.py\", line 159, in _fetch\r\n    app = import_module(appname)\r\n  File \"/iptv/var/www/sites/site_iptv/django/utils/importlib.py\", line 40, in import_module\r\n    __import__(name)\r\n  File \"/iptv/var/www/sites/site_iptv/dbsettings/__init__.py\", line 2, in <module>\r\n    from dbsettings.group import *  # NOQA\r\n  File \"/iptv/var/www/sites/site_iptv/dbsettings/group.py\", line 37, in <module>\r\n    @six.add_metaclass(GroupBase)\r\nAttributeError: 'module' object has no attribute 'add_metaclass'\r\n</pre>"},"comment":{"url":"https://api.github.com/repos/zlorf/django-dbsettings/issues/comments/93805201","html_url":"https://github.com/zlorf/django-dbsettings/pull/13#issuecomment-93805201","issue_url":"https://api.github.com/repos/zlorf/django-dbsettings/issues/13","id":93805201,"user":{"login":"zlorf","id":1769916,"avatar_url":"https://avatars.githubusercontent.com/u/1769916?v=3","gravatar_id":"","url":"https://api.github.com/users/zlorf","html_url":"https://github.com/zlorf","followers_url":"https://api.github.com/users/zlorf/followers","following_url":"https://api.github.com/users/zlorf/following{/other_user}","gists_url":"https://api.github.com/users/zlorf/gists{/gist_id}","starred_url":"https://api.github.com/users/zlorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zlorf/subscriptions","organizations_url":"https://api.github.com/users/zlorf/orgs","repos_url":"https://api.github.com/users/zlorf/repos","events_url":"https://api.github.com/users/zlorf/events{/privacy}","received_events_url":"https://api.github.com/users/zlorf/received_events","type":"User","site_admin":false},"created_at":"2015-04-16T18:10:55Z","updated_at":"2015-04-16T18:10:55Z","body":"Well, that's hard choice. I can either:\r\n1. require ``six>=1.8`` in setup.py script (the cause of error you have is old version of ``six``)\r\nor\r\n2. Use django.utils.six as you suggest.\r\n\r\nDrawbacks:\r\n1. Require a six library while django MAY have one\r\n2. In not compatible with django 1.3 (django.utils.six was introduced in 1.4.2)"}}