New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 816358 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Feb 2018
Cc:
Components:
EstimatedDays: 2
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

BeautifulSoup library in Swarming breaks with new versions of html5lib

Project Member Reported by flowblok@chromium.org, Feb 26 2018

Issue description

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'
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-py.git/+/bd5deb1d9cde6e64051495efe2398973565372ab

commit bd5deb1d9cde6e64051495efe2398973565372ab
Author: Peter Ward <flowblok@chromium.org>
Date: Tue Feb 27 00:52:36 2018

Update beautifulsoup from 4.3.1 to 4.6.0.

Bug:  816358 
Change-Id: I474c8087dab1401b35e0c9fd0183e7bd78920e60
Reviewed-on: https://chromium-review.googlesource.com/936884
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: flowblok <flowblok@chromium.org>

[modify] https://crrev.com/bd5deb1d9cde6e64051495efe2398973565372ab/appengine/third_party_local/bs4/COPYING.txt
[modify] https://crrev.com/bd5deb1d9cde6e64051495efe2398973565372ab/appengine/third_party_local/bs4/README.swarming
[modify] https://crrev.com/bd5deb1d9cde6e64051495efe2398973565372ab/appengine/third_party_local/bs4/__init__.py
[modify] https://crrev.com/bd5deb1d9cde6e64051495efe2398973565372ab/appengine/third_party_local/bs4/builder/__init__.py
[modify] https://crrev.com/bd5deb1d9cde6e64051495efe2398973565372ab/appengine/third_party_local/bs4/builder/_html5lib.py
[modify] https://crrev.com/bd5deb1d9cde6e64051495efe2398973565372ab/appengine/third_party_local/bs4/builder/_htmlparser.py
[modify] https://crrev.com/bd5deb1d9cde6e64051495efe2398973565372ab/appengine/third_party_local/bs4/builder/_lxml.py
[modify] https://crrev.com/bd5deb1d9cde6e64051495efe2398973565372ab/appengine/third_party_local/bs4/dammit.py
[modify] https://crrev.com/bd5deb1d9cde6e64051495efe2398973565372ab/appengine/third_party_local/bs4/diagnose.py
[modify] https://crrev.com/bd5deb1d9cde6e64051495efe2398973565372ab/appengine/third_party_local/bs4/element.py
[modify] https://crrev.com/bd5deb1d9cde6e64051495efe2398973565372ab/appengine/third_party_local/bs4/testing.py

Status: Verified (was: Assigned)

Sign in to add a comment