You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please disregard this if there are any overriding implications of requiring an updated version of six, but I found I needed an upgraded version in order to import html5lib.
With six==1.5.2 I receive an ImportError:
File "/usr/local/lib/python2.7/dist-packages/weasyprint/__init__.py", line 19, in <module>
import html5lib # noqa
File "/usr/local/lib/python2.7/dist-packages/html5lib/__init__.py", line 16, in <module>
from .html5parser import HTMLParser, parse, parseFragment
File "/usr/local/lib/python2.7/dist-packages/html5lib/html5parser.py", line 2, in <module>
from six import with_metaclass, viewkeys, PY3
ImportError: cannot import name viewkeys
This error goes away when I add six=1.10.0 to my requirements.
I think I decided that 1.9 being over a year old was a good enough reason to rely on it, as if you're using a recent version of html5lib, you're obviously not opposed to running recent versions of software. Aside from pip, setuptools, and wheel we have no reason not to rely on recent versions of dependencies, as far as I'm aware.
Activity
jayvdb commentedon Sep 27, 2016
The travis build errors on #301 also show that
html5lib/html5parser.pyalso importssix.viewkeys, which was introduced in six 1.9.0 .a137d14 by @kovidgoyal in 2013 is where
six.viewkeyswas introduced. It is very easy to avoid this, as that commit also included a fallback.gsnedders commentedon Oct 27, 2016
I think I decided that 1.9 being over a year old was a good enough reason to rely on it, as if you're using a recent version of html5lib, you're obviously not opposed to running recent versions of software. Aside from pip, setuptools, and wheel we have no reason not to rely on recent versions of dependencies, as far as I'm aware.
Obviously, if you disagree, say!
mdxs commentedon Jan 5, 2017
By silence procedure and #301 being merged, I would say this can be closed now.
madelinezec commentedon Apr 28, 2017
I'm having this exact error, but I have six==1.10.0 installed. Any other reason this could be happening?