niksite / url-normalize

URL normalization for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

version 1.3.1: When running Python 2, generates traceback on import

matthoskins1980 opened this issue · comments

Receive the following when running a simply import url_normalize

Traceback (most recent call last):
File "webapp.py", line 11, in
from web_api import api_bp
File "/home/developer/repos/newsflow/webapp/web_api.py", line 9, in
import newsflow.models as models
File "/home/developer/repos/newsflow/newsflow/models.py", line 8, in
from url_normalize import url_normalize
File "/home/developer/.virtualenvs/newsflow/local/lib/python2.7/site-packages/url_normalize/init.py", line 1, in
from .url_normalize import url_normalize # NOQA
File "/home/developer/.virtualenvs/newsflow/local/lib/python2.7/site-packages/url_normalize/url_normalize.py", line 38, in
from urllib.parse import urlsplit, urlunsplit
ImportError: No module named parse

Same issue here.

I think that we're supposed to use version1.2 for Python 2.7. To do so I invoked:

pip install git+git://github.com/niksite/url-normalize.git@c36d8e03cf05121b01c7917e87f69d3d7ff995f7

I know it would be better to update the code to be both Python 3 and 2 compatible.

The pip install url-normalize==1.2 would work too. I have plans to make master branch code py2/3 compatible. There is no ETA for that, though. Pool requests are always welcome.

The current version of url-normalize (v1.3.3) is python2/3 compatible.