mitsuhiko/flask-oauth

Consider changing to oauthlib or forking oauth2

Closed this issue · 15 comments

Hi Guys,

I've recently tried installing Flask-Social to find that the install failed. Tracing back the error and the dependencies it seems that the installation has failed because there is a syntax error: print "unable to find version in %s" % (VERSIONFILE,).

I assume this is due to the fact that I'm using python 3 rather than python 2. Upon further investigation, it seems that the oauth2 lib hasn't been updated in some 3 or so years so I'd like to propose moving to oauthlib as it is actively maintained and supports python3 or possibly forking the origin oauth2 library and updating it to be python3 compatible.

Cheers

I have an open pull request with python-oauth on github joestump/python-oauth2#158 which will hopefully be accepted and allow python3 to continue working for the short run. If that doesn't get accepted (and I don't think it will because of the duration the project has been without changes) then I'd like to suggest we implement the fork I've created CentricWebEstate/python-oauth2. It's been tested with a live python3 site and it's in my best interests that it works well.

You are looking for Flask-OAuthlib.

Flask-Social requires flask-oauth2 which is why I'm interested.

On Thu, Jul 3, 2014 at 8:00 PM, Hsiaoming Yang notifications@github.com
wrote:

You are looking for Flask-OAuthlib
https://github.com/lepture/flask-oauthlib.


Reply to this email directly or view it on GitHub
#66 (comment)
.

This PR will update Flask-Social to Flask-OAuthlib. I will try to do some work today to get things merged in.

Fantastic

Hi,
i still see the same issue when i try to run pip install Flask-Social.

Is there some other way to install this?

Just did pip install flask-social in a clean virtual environment without issue. Maybe you have other dependency issues.

i just tried the same locally in a fresh virtual environment, but i still get the same error...

C:\sandbox\cleanenv>env\Scripts\pip install Flask-Social --ignore-installed
You are using pip version 6.0.8, however version 6.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting Flask-Social
  Downloading Flask-Social-1.6.2.tar.gz
Collecting Flask-Security>=1.6.3 (from Flask-Social)
  Downloading Flask-Security-1.7.4.tar.gz (41kB)
    100% |################################| 45kB 584kB/s
Collecting Flask-OAuth>=0.12 (from Flask-Social)
  Downloading Flask-OAuth-0.12.tar.gz
Collecting Flask>=0.9 (from Flask-Security>=1.6.3->Flask-Social)
  Downloading Flask-0.10.1.tar.gz (544kB)
    100% |################################| 544kB 267kB/s
Collecting Flask-Login>=0.1.3 (from Flask-Security>=1.6.3->Flask-Social)
  Downloading Flask-Login-0.2.11.tar.gz
Collecting Flask-Mail>=0.7.3 (from Flask-Security>=1.6.3->Flask-Social)
  Downloading Flask-Mail-0.9.1.tar.gz (45kB)
    100% |################################| 49kB 546kB/s
Collecting Flask-Principal>=0.3.3 (from Flask-Security>=1.6.3->Flask-Social)
  Downloading Flask-Principal-0.4.0.tar.gz
Collecting Flask-WTF>=0.8 (from Flask-Security>=1.6.3->Flask-Social)
  Downloading Flask_WTF-0.11-py2.py3-none-any.whl
Collecting itsdangerous>=0.17 (from Flask-Security>=1.6.3->Flask-Social)
  Downloading itsdangerous-0.24.tar.gz (46kB)
    100% |################################| 49kB 2.2MB/s
Collecting passlib>=1.6.1 (from Flask-Security>=1.6.3->Flask-Social)
  Downloading passlib-1.6.2.tar.gz (408kB)
    100% |################################| 409kB 267kB/s
Collecting oauth2 (from Flask-OAuth>=0.12->Flask-Social)
  Downloading oauth2-1.5.211.tar.gz
    Traceback (most recent call last):
      File "<string>", line 20, in <module
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

      File "<string>", line 20, in <module

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in C:\Users\XXX_~1\AppData\Local\Temp\pip-build-n3fphkro\oauth2
You are using pip version 6.0.8, however version 6.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

may actually be your issue. I vaguely remember some issue around setuptools. You can also upgrade your base install of virtualenv so that new environments will have the latest version of pip.

can't install either with python 3. I've tried in a clean virtual environment and with up-to-date pip (v1.1.1)

(temp)MacBook-Pro:~ minorblend$ pip install flask-social
Collecting flask-social
  Using cached Flask-Social-1.6.2.tar.gz
Collecting Flask-Security>=1.6.3 (from flask-social)
  Using cached Flask-Security-1.7.4.tar.gz
Collecting Flask-OAuth>=0.12 (from flask-social)
  Using cached Flask-OAuth-0.12.tar.gz
Collecting Flask>=0.9 (from Flask-Security>=1.6.3->flask-social)
  Using cached Flask-0.10.1.tar.gz
Collecting Flask-Login>=0.1.3 (from Flask-Security>=1.6.3->flask-social)
  Using cached Flask-Login-0.2.11.tar.gz
Collecting Flask-Mail>=0.7.3 (from Flask-Security>=1.6.3->flask-social)
  Using cached Flask-Mail-0.9.1.tar.gz
Collecting Flask-Principal>=0.3.3 (from Flask-Security>=1.6.3->flask-social)
  Using cached Flask-Principal-0.4.0.tar.gz
Collecting Flask-WTF>=0.8 (from Flask-Security>=1.6.3->flask-social)
  Using cached Flask_WTF-0.11-py2.py3-none-any.whl
Collecting itsdangerous>=0.17 (from Flask-Security>=1.6.3->flask-social)
  Using cached itsdangerous-0.24.tar.gz
Collecting passlib>=1.6.1 (from Flask-Security>=1.6.3->flask-social)
  Using cached passlib-1.6.2.tar.gz
Collecting oauth2 (from Flask-OAuth>=0.12->flask-social)
  Using cached oauth2-1.5.211.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/bh/d31q26297b5db67mfw5694yh0000gn/T/pip-build-xna7c17c/oauth2

I don't think oauth2 is not Python 3 compatible, which is blocking flask-oauth and flask-social. See caniusepython3.com

Hey guys, if you're willing, we've recently begun maintenance of python-oauth2 again. So if oauthlib isn't in use yet, we should be right to continue using py-oauth2 again.

Just now ran into this issue as well. Tried to install Flask-Social, and it complains about urlparse (see also #67).

I assume I have the latest versions of everything as I ran the install no less than 10 minutes ago.

@exhuma If i'm not mistaken the package isn't up to date, but you can install directly
pip install git+https://github.com/mattupstate/flask-social.git --upgrade