在virtualenv中的django-oauth2-provider语法错误

时间:2013-11-22 19:50:48

标签: django oauth-2.0

我在我的virtualenv中用python 3.2,django 1.6和djangorestframework 2.3.9做了一个pip install django-oauth2-provider

我收到以下语法错误:

为django-oauth2-provider

运行setup.py安装
warning: no files found matching '*.txt' under directory 'provider/templates'
warning: no files found matching '*json' under directory 'provider/'
  File "/home/denise/pf-env/lib/python3.2/site-packages/provider/oauth2/tests.py", line 108
    self.assertTrue(escape(u"No 'response_type' supplied.") in response.content)
                                                         ^
SyntaxError: invalid syntax

  File "/home/denise/pf-env/lib/python3.2/site-packages/provider/oauth2/forms.py", line 63
    return u' '.join([smart_unicode(val) for val in value]).split(u' ')
              ^
SyntaxError: invalid syntax

  File "/home/denise/pf-env/lib/python3.2/site-packages/provider/forms.py", line 54
    except OAuthValidationError, e:
                               ^
SyntaxError: invalid syntax

  File "/home/denise/pf-env/lib/python3.2/site-packages/provider/views.py", line 256
    except OAuthError, e:
                     ^
SyntaxError: invalid syntax

1 个答案:

答案 0 :(得分:0)

基于项目存储库中的.tox文件,仅支持Python 2.6和2.7版本。还有2个open pull请求来修复对Django 1.6的支持。

请参阅: https://github.com/caffeinehit/django-oauth2-provider/blob/master/tox.ini