BeautifulSoup 4.3.1 relies on an implementation detail of html5lib, which breaks on the version of html5lib installed on my workstation. The latest version, BeautifulSoup 4.6.0 still relies on the implementation detail, but in a more resilient way.
We should upgrade the version in appengine/third_party_local/bs4.
Here's the failure, for context:
$ luci-py/appengine/swarming/server/task_request_test.py
Traceback (most recent call last):
File "server/task_request_test.py", line 20, in <module>
from test_support import test_case
File ".../luci-py/appengine/swarming/test_support/test_case.py", line 15, in <module>
import webtest
File ".../luci-py/appengine/components/../third_party_local/webtest/__init__.py", line 9, in <module>
from webtest.app import TestApp
File ".../luci-py/appengine/components/../third_party_local/webtest/app.py", line 30, in <module>
from webtest.response import TestResponse
File ".../luci-py/appengine/components/../third_party_local/webtest/response.py", line 5, in <module>
from webtest import forms
File ".../luci-py/appengine/components/../third_party_local/webtest/forms.py", line 6, in <module>
from bs4 import BeautifulSoup
File ".../luci-py/appengine/components/../third_party_local/bs4/__init__.py", line 30, in <module>
from .builder import builder_registry, ParserRejectedMarkup
File ".../luci-py/appengine/components/../third_party_local/bs4/builder/__init__.py", line 311, in <module>
from . import _html5lib
File ".../luci-py/appengine/components/../third_party_local/bs4/builder/_html5lib.py", line 57, in <module>
class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'
Comment 1 by flowblok@chromium.org
, Feb 26 2018Here's the failure, for context: $ luci-py/appengine/swarming/server/task_request_test.py Traceback (most recent call last): File "server/task_request_test.py", line 20, in <module> from test_support import test_case File ".../luci-py/appengine/swarming/test_support/test_case.py", line 15, in <module> import webtest File ".../luci-py/appengine/components/../third_party_local/webtest/__init__.py", line 9, in <module> from webtest.app import TestApp File ".../luci-py/appengine/components/../third_party_local/webtest/app.py", line 30, in <module> from webtest.response import TestResponse File ".../luci-py/appengine/components/../third_party_local/webtest/response.py", line 5, in <module> from webtest import forms File ".../luci-py/appengine/components/../third_party_local/webtest/forms.py", line 6, in <module> from bs4 import BeautifulSoup File ".../luci-py/appengine/components/../third_party_local/bs4/__init__.py", line 30, in <module> from .builder import builder_registry, ParserRejectedMarkup File ".../luci-py/appengine/components/../third_party_local/bs4/builder/__init__.py", line 311, in <module> from . import _html5lib File ".../luci-py/appengine/components/../third_party_local/bs4/builder/_html5lib.py", line 57, in <module> class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder): AttributeError: 'module' object has no attribute '_base'