flask-oauth icon indicating copy to clipboard operation
flask-oauth copied to clipboard

Fix import urlparse for python 3

Open iamsalnikov opened this issue 9 years ago • 3 comments

When I try to run my script with that code:

from flask_oauth import OAuth


oauth = OAuth()

then I get this error:

Traceback (most recent call last):
  File "web_server.py", line 1, in <module>
    from web import app
  File "/path/web/__init__.py", line 5, in <module>
    from web import auth
  File "/path/web/auth.py", line 6, in <module>
    from web.oauth import twitter
  File "/path/oauth.py", line 1, in <module>
    from flask_oauth import OAuth
  File "/path/vendor/lib/python3.4/site-packages/flask_oauth.py", line 14, in <module>
    from urlparse import urljoin
ImportError: No module named 'urlparse'

In python 3.4 module urlparse became urllib.parse. In this pull request I try to fix this.

iamsalnikov avatar Oct 27 '15 06:10 iamsalnikov

+1

rembish avatar Oct 27 '15 17:10 rembish

Just wrote the same before checking the pull requests. This is the only dependency failure right now for porting my Flask app.

+1

rachtsingh avatar Nov 18 '15 20:11 rachtsingh

Duplicate of #67

tcyrus avatar Apr 28 '16 17:04 tcyrus