Skip to content
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

simpletree TreeWalker removed in html5lib 1.0b1 #94

Closed
gavinwahl opened this issue May 17, 2013 · 9 comments
Closed

simpletree TreeWalker removed in html5lib 1.0b1 #94

gavinwahl opened this issue May 17, 2013 · 9 comments
Milestone

Comments

@gavinwahl
Copy link

The simpletree walker, used by bleach, was removed in html5lib 1.0b1. See the changelog: https://pypi.python.org/pypi/html5lib#change-log

Bleach fails with:

Traceback (most recent call last):
  File "/srv/python-environments/8266ee6461a534ae/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/gavin/bleach/bleach/tests/test_unicode.py", line 27, in test_mixed
    clean(u'Домашняяヘルプとチュートリアル'))
  File "/home/gavin/bleach/bleach/__init__.py", line 111, in clean
    return _render(parser.parseFragment(text))
  File "/home/gavin/bleach/bleach/__init__.py", line 306, in _render
    return force_unicode(_serialize(tree))
  File "/home/gavin/bleach/bleach/__init__.py", line 313, in _serialize
    stream = walker(domtree)
TypeError: 'NoneType' object is not callable

Because html5lib.treewalkers.getTreeWalker('simpletree') returns None.

@joshcartme
Copy link

+1, I was about to post this same issue myself.

@jsocol
Copy link
Contributor

jsocol commented May 17, 2013

Thanks guys, I'll take a look this weekend.


Sent from my phone, please excuse the occasional typo.

On May 17, 2013, at 5:43 PM, joshcartme notifications@github.com wrote:

+1, I was about to post this same issue myself.


Reply to this email directly or view it on GitHub.

@stephenmcd
Copy link

Could we get a patch release for bleach that just pins the max html5lib version for now?

@jsocol
Copy link
Contributor

jsocol commented May 17, 2013

I can try to get that out and on pypi late tonight.


Sent from my phone, please excuse the occasional typo.

On May 17, 2013, at 5:55 PM, Stephen McDonald notifications@github.com wrote:

Could we get a patch release for bleach that just pins the max html5lib version for now?


Reply to this email directly or view it on GitHub.

@stephenmcd
Copy link

Thanks a lot James.

FWIW this currently breaks https://github.com/stephenmcd/mezzanine which pins bleach but doesn't pin html5lib.

@stephenmcd
Copy link

We're going to do a patch release of Mezzanine that pins html5lib, so no rush.

Sorry about the noise.

jsocol pushed a commit that referenced this issue May 18, 2013
Addresses #94 but doesn't fix it. Will need to look into replacing
simpletree.

- Pin requirements file.
- Pin setup.py requirements.
- Add note to docs.
@jsocol
Copy link
Contributor

jsocol commented May 18, 2013

I am dumb and put 0.9.5 in the requirements.txt and docs/index.rst files. But setup.py has 0.95, which is correct, so tag v1.2.2 will install. The latest master has the correct requirements.

@mdxs
Copy link
Contributor

mdxs commented Jan 13, 2014

Can be considered closed in 98a7c8e (see #101 and #111 and also note the remark in #111 about the html5lib version numbering changes from 1.0b back to 0.99 series).

@jsocol
Copy link
Contributor

jsocol commented Jan 14, 2014

Yep, thanks @mdxs!

@jsocol jsocol closed this as completed Jan 14, 2014
manurFR added a commit to manurFR/mystrade-public that referenced this issue Mar 17, 2014
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

Successfully merging a pull request may close this issue.

5 participants