Skip to content

Older versions of six may be incompatible #298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
keithcallenberg opened this issue Aug 31, 2016 · 4 comments
Closed

Older versions of six may be incompatible #298

keithcallenberg opened this issue Aug 31, 2016 · 4 comments

Comments

@keithcallenberg
Copy link

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.

@jayvdb
Copy link
Contributor

jayvdb commented Sep 27, 2016

The travis build errors on #301 also show that html5lib/html5parser.py also imports six.viewkeys, which was introduced in six 1.9.0 .

a137d14 by @kovidgoyal in 2013 is where six.viewkeys was introduced. It is very easy to avoid this, as that commit also included a fallback.

@gsnedders
Copy link
Member

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
Copy link

mdxs commented Jan 5, 2017

By silence procedure and #301 being merged, I would say this can be closed now.

@madelinezec
Copy link

I'm having this exact error, but I have six==1.10.0 installed. Any other reason this could be happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants